Damage helper holds simulation aware data in static function
|Reported by:||sanderd17||Owned by:||Josh|
|Priority:||Release Blocker||Milestone:||Alpha 15|
|Component:||UI & Simulation||Keywords:|
The Damage helper script creates a new entity on the first missile fired and missed
Damage.dummyTargetEntity = Engine.AddEntity('special/dummy');
As the script is static, the dummyTargetEntity is always remembered, even if the game is terminated (without the engine closed). You can see this in Atlas:
- Start on an empty map
- place at least two enemy archers on the map, close to each other
- start the simulation and let them fire until at least one arrow missed target
- reset the simulation
- Add a new entity, somewhere else on the map
- When the simulation is started, the unit jumps to all positions of missed arrows, as it got the ID of the dummyTarget, and the id of the dummyTarget wasn't deleted.
Depending on the number of entities in previous games, it can even cause OOS problems if people didn't restart the entire game before starting a new game.
This should be solved properly, by adding a method to RangeManager that allows a range query around a position instead of just around an entity.
Change History (11)
comment:3 by , 9 years ago
|Priority:||Should Have → Release Blocker|
|Status:||closed → reopened|