mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-08-15 14:43:32 -07:00
Fix UnitMotion 'path prediction' to not trigger if following a short path
This is needed otherwise units might never go around pure unit obstructions.
Adds a small test map.
Fixes def0f57365
This commit is contained in:
parent
dc6544a6c4
commit
7cc495ec91
2 changed files with 4 additions and 1 deletions
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0b3343935dc599dd9d338b9fbd5961e0a0685862b164ded020e10e97f4c597ae
|
||||
size 65417
|
||||
|
|
@ -1091,7 +1091,7 @@ void CCmpUnitMotion::PostMove(CCmpUnitMotionManager::MotionState& state, fixed d
|
|||
const bool needPathUpdate{PathingUpdateNeeded(state.pos)};
|
||||
|
||||
// If we're following a long-path, check if we might run into units in advance, to smoothe motion.
|
||||
if (!needPathUpdate && !state.wasObstructed && m_LongPath.m_Waypoints.size() >= 1)
|
||||
if (!needPathUpdate && !state.wasObstructed && m_LongPath.m_Waypoints.size() >= 1 && m_ShortPath.m_Waypoints.empty())
|
||||
{
|
||||
ICmpObstructionManager::tag_t specificIgnore;
|
||||
if (m_MoveRequest.m_Type == MoveRequest::ENTITY)
|
||||
|
|
|
|||
Loading…
Reference in a new issue