mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-17 13:53:57 -07:00
This improves behaviour when units need to go around a concave obstacle. They would tend to clump inside the 'dead-end' before realising they needed to go around. This was rather easy to trigger on Acropolis. See included Unit Motion Integration Test. The cause is the logic that removed the next long waypoint when obstructed. While that behaviour is desirable, removing too many waypoints means the unit tries to short-path, using a small domain range, to a goal that's impassable, meaning they go as close as they can in Euclidian distance, i.e. towards the dead end. This changes that behaviour by only deleting waypoints within a certain distance from the entity, scaling with search-space range. It's tricky to find a good compromise between performance and behaviour here, but the values I've picked seem OK. However, the fact that the entity would ultimately remove all waypoints and thus trigger a full path recomputation was actually a feature, inherited from D2754 / |
||
|---|---|---|
| .. | ||
| CinemaPath.cpp | ||
| CinemaPath.h | ||
| Geometry.cpp | ||
| Geometry.h | ||
| Grid.h | ||
| HierarchicalPathfinder.cpp | ||
| HierarchicalPathfinder.h | ||
| LongPathfinder.cpp | ||
| LongPathfinder.h | ||
| Los.h | ||
| MapEdgeTiles.h | ||
| Pathfinding.cpp | ||
| Pathfinding.h | ||
| PathGoal.cpp | ||
| PathGoal.h | ||
| Player.h | ||
| Position.h | ||
| PriorityQueue.h | ||
| Rasterize.cpp | ||
| Rasterize.h | ||
| Render.cpp | ||
| Render.h | ||
| Selection.cpp | ||
| Selection.h | ||
| SimulationCommand.h | ||
| Spatial.h | ||
| VertexPathfinder.cpp | ||
| VertexPathfinder.h | ||