Moderator
M
Moderator
12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.
23:07, 2nd Jan 2013
Magtheridon96:
In the timer recycler:
This can be replaced with
Also, the unit recycler has bad semantics.
A user will pass in a player, expecting you to create a dummy for that player, but if a recycled unit already exists in the stack, you will give him a unit with an unknown owner.
I think the best solution is to ignore coordinates.
Just return a unit from the stack after setting his animation to "stand".
Facing and coordinates should be handled by the user.
Currently, this unit recycler is unsuitable for projectile systems in the aesthetic field because of the absence of a by-angle recycling method :/. I'd recommend looking into Nestharus' Dummy lib. It's perfect for this kind of thing. In fact, if you would take his code in the compiled JASS form and clean it, I would approve the resource with Nes' permission.
(You made this for projectile recycling mainly, am I right?)
IcemanBo: Too long as NeedsFix. Rejected.
23:07, 2nd Jan 2013
Magtheridon96:
In the timer recycler:
call SaveTimerHandle(udg_E_RecycleHash,1,timerIndex,CreateTimer())
This can be replaced with
return CreateTimer()
.Also, the unit recycler has bad semantics.
A user will pass in a player, expecting you to create a dummy for that player, but if a recycled unit already exists in the stack, you will give him a unit with an unknown owner.
I think the best solution is to ignore coordinates.
Just return a unit from the stack after setting his animation to "stand".
Facing and coordinates should be handled by the user.
Currently, this unit recycler is unsuitable for projectile systems in the aesthetic field because of the absence of a by-angle recycling method :/. I'd recommend looking into Nestharus' Dummy lib. It's perfect for this kind of thing. In fact, if you would take his code in the compiled JASS form and clean it, I would approve the resource with Nes' permission.
(You made this for projectile recycling mainly, am I right?)