afisakov
You can change this now in User CP.
- Reaction score
- 37
I am trying to fix some leaks in a map that spawns units like this
my attempt at a fix looks like
so my question is 2 parts
1) did I fix all the leaks, hopefully make something that does not leak
2) is it true to the original function? I ask because I am not entirely sure what
does and am assuming it is a type of attack-move, if not can someone please tell me how to fix my code to do the right thing without introducing a leak?
Thanks in advance for the help
Code:
call CreateNUnitsAtLoc($F,'n006',Player($C),GetRectCenter(JV),bj_UNIT_FACING)
call GroupPointOrderByIdLoc(GetLastCreatedGroup(),$D0016,GetRectCenter(mV))
Code:
set spa=15
set hx=GetRectCenter(JV)
set gx=GetRectCenter(mV)
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = spa
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'n006', Player(0), udg_hx, bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "attack",gx)
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveLocation (hx)
call RemoveLocation (gx)
1) did I fix all the leaks, hopefully make something that does not leak
2) is it true to the original function? I ask because I am not entirely sure what
Code:
call GroupPointOrderByIdLoc(GetLastCreatedGroup(),$D0016,GetRectCenter(mV))
Thanks in advance for the help