I've updated to version 2.5, because the compensatory mechanism for missiles
with equal origin and impact location was prone to hit the OP limit.
The impact was moved by steps of 0.0001 in x axis until the distance is not 0.
That was a too small value as warcraft rounds it after square root function to 0.
The chance for running into an OP limit was too high.
Now steps of 0.01 in x axis are used instead of 0.0001.
Thanks to Chaosy for reporting that problem.
module MissileStruct has been split into
1.) module MissileLaunch
2.) module MissileTerminate
3.) module MissileAction
4.) module MissileStruct ( this one implements all 4 )
The advantage is that you can place module MissileLaunch at the
very top of the struct. If you create a new missile instance from one of your
Missile interface methods like in onCollide, no pseudo code must be generated by the JassHelper.
Basically you gain a bit more controll over the code in module MissileStruct, just in case you need it.
JASS:
module MissileStruct
implement MissileLaunch
implement MissileTerminate
implement MissileAction
private static method onInit takes nothing returns nothing
call MissileCreateCollection(thistype.typeid)
call MissileCreateExpression(thistype.typeid, function thistype.missileIterateP)
endmethod
endmodule
Optimized collision detection a bit.
Removed collisionZ as member ( still there for bc )
JASS:
// Setting collision z is deprecated since Missile v2.5.
method operator collisionZ= takes real value returns nothing
endmethod
method operator collisionZ takes nothing returns real
return collision
endmethod
Seperated missile motion into a own trigger and own list.
That's faster, generates less code and gives us a list of all launched missiles...
I'll implement onMissile in the next version.
Now that I have a list of all missiles, it's very easy.
It will not be very fast I fear.
Edit:
Also nodes are no longere enqueued to the list, but instead pushed front.