Alright so I am creating a projectile system and the main trigger is the one that moves them, each missile in flight is one instance of the struct and each instance of the struct contains these variables:
Right now this doesn't lag with multiple missiles in flight but I was wondering if the amount of variables in a struct would cause lag if it gets any higher. 'And secondly, would it be faster to store the target X and Y in the struct and update it every iteration, or just GetUnitX(t) every iteration (I believe I only require it once per iteration). Same with the missile X and Y.
JASS:
unit m //Missile
unit c //Caster
effect mdl //Model(special effect)
unit t //Target
real sp //Speed
integer ID //Event Id
real x //Missiles X coord
real y //Missiles Y coord
real tx //Target X
real ty //Target Y
real d //Distance Between m and t
real f //Missiles Facing
integer Level //Level
real dmg //Damage done
Right now this doesn't lag with multiple missiles in flight but I was wondering if the amount of variables in a struct would cause lag if it gets any higher. 'And secondly, would it be faster to store the target X and Y in the struct and update it every iteration, or just GetUnitX(t) every iteration (I believe I only require it once per iteration). Same with the missile X and Y.