0ad/source/simulation2
wraitii 45d136d57e Fix GetPosition2D call when the entity may be out of the world in unitMotion
As reported by Freagarach following a7da40ac2f.

32e8ed51aa introduced a "MoveObstructed" message, that could be sent
when the entity ran into obstructions, to stop early.
In HandleObstructedMove, my intention, as written in the comment, was
that the caller would do its thing (call StopMoving(), move out of the
world etc.) and thus ComputeGoal would return early.

However, I mistakenly left the `cmpPosition->GetPosition2D()` in between
that and ComputeGoal, which would then fail.

This fixes that by moving it after the `ComputeGoal` call.

Also add a sanity StopMoving() call to a7da40ac2f's move-out-of-world
call.

Reported by: Freagarach
Differential Revision: https://code.wildfiregames.com/D2935
This was SVN commit r23940.
2020-08-06 08:40:14 +00:00
..
components Fix GetPosition2D call when the entity may be out of the world in unitMotion 2020-08-06 08:40:14 +00:00
docs Replace deprecated jsval with JS::Value. 2017-08-28 10:27:36 +00:00
helpers Improve ship pickup. 2020-08-03 12:02:24 +00:00
scripting Improve the warning message for FromJSValue<CColor> when trying to convert a non-object to CColor. 2020-06-01 16:09:28 +00:00
serialization RangeManager: Grid for 2D array, enum cleanups. 2020-06-13 09:05:40 +00:00
system Add an interface for Reinforcement Learning. 2020-08-01 10:52:59 +00:00
tests RangeManager: Grid for 2D array, enum cleanups. 2020-06-13 09:05:40 +00:00
MessageTypes.h UnitMotion - Send messages to UnitAI when obstructed, to allow stopping early when walking and avoiding pathfinding lag. 2019-07-22 18:07:24 +00:00
Simulation2.cpp Use victory conditions json's in Atlas 2020-07-18 17:39:59 +00:00
Simulation2.h Use victory conditions json's in Atlas 2020-07-18 17:39:59 +00:00
TypeList.h Add a C++ interface for CCmpAttack. 2020-04-21 21:44:05 +00:00