0ad/source/simulation2
wraitii 1e2f511a09 UnitMotion - reject paths that would not take the unit closer to the goal than it is now.
This helps with #3144 and units not going idle when ordered to clump
together.

By rejecting paths that would not take the unit closer to the goal than
it is, we can avoid the case where a unit at A finds a short path to B,
goes there, gets stuck, finds a new short path to A, etc. ad infinitum.

It doesn't completely fix the problem since two units moving might still
occasionally become stuck against one another, but it makes it rarer
(unit pushing would probably finish solving this).

This assumes that being as close as possible to the goal is the best
behaviour when trying to move somewhere, even when it is unreachable.

Refs #3144

Differential Revision: https://code.wildfiregames.com/D2075
This was SVN commit r22566.
2019-07-28 10:29:28 +00:00
..
components UnitMotion - reject paths that would not take the unit closer to the goal than it is now. 2019-07-28 10:29:28 +00:00
docs Replace deprecated jsval with JS::Value. 2017-08-28 10:27:36 +00:00
helpers Fix memory leak introduced by 3a839517ce in SparseGrid 2019-07-24 17:11:22 +00:00
scripting 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
serialization SpiderMonkey-related changes in preparation for the upgrade to SpiderMonkey 45, refs #4893. 2019-01-13 16:37:41 +00:00
system Improvements to simulation hotloading before the SM upgrade, refs #4893. 2019-07-19 21:58:58 +00:00
tests Update of the scripting tests. Test some modding features and update JS::Value integer limits. 2019-07-19 15:41:27 +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 Provide ScriptInterface CreateObject and CreateArray functions to replace Eval calls following 7c2e9027c2, 1c0536bf08 and later. 2019-07-22 19:35:14 +00:00
Simulation2.h Remove unnecessary argument from CSimulation2::InitGame 2018-02-09 19:50:01 +00:00
TypeList.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