0ad/source/simulation2/helpers
wraitii 32e8ed51aa UnitMotion - Send messages to UnitAI when obstructed, to allow stopping early when walking and avoiding pathfinding lag.
As reported by #5521, Ordering units to walk to a point in a forest can
lag terribly, as units will end up computing long short paths in the
forest, which can result in `ComputeShortPath` calls that individually
take upwards of 80ms.

This can be alleviated by allowing units to stop a bit earlier. A23
handled this in UnitMotion directly, but it's better to handle this in
UnitAI to avoid surprises and to make it customisable on a per-state
level.

This diff further speeds up using the short pathfinder by starting with
a smaller search range, limiting the max-range more and moving the range
slightly towards the goal.

This also refactors UM sending messages to UnitAI so that we may in the
future push more information (in particular, the entity_id that a unit
was obstructed by could be interesting for COMBAT).

This doesn't fix the possibility of lag, but it reduces its occurrence
to levels that should be similar to A23 and thus acceptable enough.

Tested By: Freagarach
Fixes #5521

Differential Revision: https://code.wildfiregames.com/D2105
This was SVN commit r22526.
2019-07-22 18:07:24 +00:00
..
CinemaPath.cpp Move CinemaPath class to the simulation helper directory, because it contains predominantly simulation data that is already serialized. 2017-04-14 23:20:49 +00:00
CinemaPath.h Move CinemaPath class to the simulation helper directory, because it contains predominantly simulation data that is already serialized. 2017-04-14 23:20:49 +00:00
Geometry.cpp Move "IsInRange" family of functions to the Obstruction Manager and make the commutative. 2019-06-06 19:37:23 +00:00
Geometry.h Move "IsInRange" family of functions to the Obstruction Manager and make the commutative. 2019-06-06 19:37:23 +00:00
Grid.h Fix the -Wclass-memaccess compiler warning in the pathfinders Grid.h, refs #5294. 2019-07-19 12:52:10 +00:00
HierarchicalPathfinder.cpp Hierarchical pathfinder: Speed up edge update 2019-05-13 17:02:16 +00:00
HierarchicalPathfinder.h Hierarchical pathfinder: Speed up edge update 2019-05-13 17:02:16 +00:00
LongPathfinder.cpp Fix a m_JumpPointCache assertion failure in debug mode, refs fa726867f1. 2019-06-04 08:29:47 +00:00
LongPathfinder.h Decouple long and hierarchical pathfinders to an extent. 2019-05-13 16:58:00 +00:00
MapEdgeTiles.h Unify the magic number indicating the number of impassable tiles at the map edge redundant in the Pathfinder, RangeManager and MapGenerator. 2019-07-12 16:38:51 +00:00
Pathfinding.h Adapt unitMotion to edge-edge distance checks. 2019-07-01 19:50:06 +00:00
PathGoal.cpp Consider that the point could be inside the goal area in some PathGoal functions 2018-01-16 02:15:04 +00:00
PathGoal.h Consider that the point could be inside the goal area in some PathGoal functions 2018-01-16 02:15:04 +00:00
Player.h Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
Position.h Rename CELL_SIZE to TERRAIN_TILE_SIZE, to free up the term "cell" for other concepts. 2012-01-12 12:51:10 +00:00
PriorityQueue.h New long-range pathfinder. 2015-06-12 18:58:24 +00:00
Rasterize.cpp Actually remove trailing tabs from source/. 2016-11-23 14:09:58 +00:00
Rasterize.h New long-range pathfinder. 2015-06-12 18:58:24 +00:00
Render.cpp Don't crash when calling the profiler from a 'non-main' thread 2019-05-04 15:03:10 +00:00
Render.h Move selection ring OverlayTexture code from CCmpSelectable::UpdateTexturedLineOverlay to the SOverlayTexturedLine struct in graphics/Overlay.cpp and SimRender in simulation2/helpers/Render.cpp. 2017-12-10 00:19:51 +00:00
Selection.cpp Cleanup the rest of the mess introduced with the NonGaiaEntities functions in 8c7b6dceaa. 2017-03-25 02:42:51 +00:00
Selection.h Cleanup the rest of the mess introduced with the NonGaiaEntities functions in 8c7b6dceaa. 2017-03-25 02:42:51 +00:00
SimulationCommand.h SpiderMonkey 38 upgrade: 10/35 2016-09-02 16:24:46 +00:00
Spatial.h Remove trailing whitespace and whitespace in empty lines of source/ except source/third_party/. 2016-11-23 11:18:37 +00:00
VertexPathfinder.cpp 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
VertexPathfinder.h Remove 'Async' from short/long path requests names 2019-05-26 13:47:41 +00:00