Open rekterakathom opened 3 years ago
What does the change from using modelToWorld to modelToWorldWorld do?
Edit: I just realized it does make the code easier to read but, my question is does it also optimize the code as well? I would think so since it's only doing the ASL conversion once (Just being curious btw)
What does the change from using modelToWorld to modelToWorldWorld do?
Edit: I just realized it does make the code easier to read but, my question is does it also optimize the code as well? I would think so since it's only doing the ASL conversion once (Just being curious btw)
It does optimize the code a bit due to there being a single ASL conversion like you said, though the optimization is most likely not noticeable in practice. Putting the AGLtoASL conversion straight to _pos2 would have the same effect,
Added: eyePos player variable so it is checked only once per player
Added: forEach _selections now exits the loop if unit was seen
Changed: AGLToASL modelToWorld -> modelToWorldWorld
Changed: The order of selections to check so that the most likely selections to be seen are first