Core/Movement: Prevent IdleMovementGenerator being put into MOTION_SLOT_IDLE and MOTION_SLOT_ACTIVE simultaneously

This commit is contained in:
Machiavelli committed 2012-01-13 16:43:49 +01:00
1 parent e9b243991e
commit 2293d2d7df
7 files changed
+12 -11

No files matched your search

+4 -5
View File
@@ -175,12 +175,11 @@ void MotionMaster::DelayedExpire()
--i_top;
}
void MotionMaster::MoveIdle(MovementSlot slot)
void MotionMaster::MoveIdle()
{
//if (empty() || !isStatic(top()))
// push(&si_idleMovement);
if (!isStatic(Impl[slot]))
Mutate(&si_idleMovement, slot);
//! Should be preceded by MovementExpired or Clear if there's an overlying movementgenerator active
if (empty() || !isStatic(top()))
Mutate(&si_idleMovement, MOTION_SLOT_IDLE);
}
void MotionMaster::MoveRandom(float spawndist)