wraitii
847f3a9995
Unit Motion currently checks if the unit is at destination during the MT_Update_Motion* step, which happens late in the turn (notably, after Timer.js) and moreover happens while entities are being moved (e.g. entities with lower IDs have moved already, entities with higher IDs have yet to do so). This changes UnitMotion to instead check at turn start, which: - benefits from in-turn path computations for more fluid movement - ensure that distance checks aren't done against an entity that has already moved for the turn. The latter issue led to units failing to get in range of their target when chasing them, in some situations. As a side effect, this means that UnitAI move requests always take one turn to succeed, so orders should be updated to check for range (or they'll waste a turn). This is done for garrisoning, other orders were already doing so. Also includes a small tweak to avoid units rotating randomly when they have no movement to accomplish. Patch by: bb Reviewed By: wraitii Refs #5936 Differential Revision: https://code.wildfiregames.com/D3230 This was SVN commit r24797. |
||
---|---|---|
.. | ||
data | ||
logs | ||
system |