Core/Movement: fixed logic in selecting current movement generator slot
This commit is contained in:
1 parent
9d16c1edb2
commit
f6be6a42ad
1 file changed
+4
-4
@@ -152,12 +152,12 @@ void MotionMaster::MovementExpired(bool reset /*= true*/)
|
||||
|
||||
MovementSlot MotionMaster::GetCurrentSlot() const
|
||||
{
|
||||
if (empty())
|
||||
return MOTION_SLOT_ACTIVE;
|
||||
|
||||
if (topOrNull())
|
||||
if (empty() || !top())
|
||||
return MOTION_SLOT_IDLE;
|
||||
|
||||
if (top())
|
||||
return MOTION_SLOT_ACTIVE;
|
||||
|
||||
return MAX_MOTION_SLOT;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user