Fix OOS in unit motion
Fixes 592453c62f
wasObstructed and wentStraight are not reset when Move() isn't called,
but PostMove may still be called (if the unit was pushed). This will
OOS.
Differential Revision: https://code.wildfiregames.com/D4088
This was SVN commit r25686.
This commit is contained in:
parent
7de9487a87
commit
3745940de8
@ -965,6 +965,9 @@ void CCmpUnitMotion::PreMove(CCmpUnitMotionManager::MotionState& state)
|
||||
{
|
||||
state.ignore = !m_Pushing || !m_BlockMovement;
|
||||
|
||||
state.wasObstructed = false;
|
||||
state.wentStraight = false;
|
||||
|
||||
// If we were idle and will still be, no need for an update.
|
||||
state.needUpdate = state.cmpPosition->IsInWorld() &&
|
||||
(m_CurSpeed != fixed::Zero() || m_MoveRequest.m_Type != MoveRequest::NONE);
|
||||
|
Loading…
Reference in New Issue
Block a user