Core/Movement: use better checks in GetCurrentSlot to get more reliable slot results
This commit is contained in:
1 parent
8d3ce54758
commit
d60fbb842e
1 file changed
+2
-2
@@ -152,10 +152,10 @@ void MotionMaster::MovementExpired(bool reset /*= true*/)
|
||||
|
||||
MovementSlot MotionMaster::GetCurrentSlot() const
|
||||
{
|
||||
if (empty() || !top())
|
||||
if (empty() || (_slot[MOTION_SLOT_IDLE] && !_slot[MOTION_SLOT_ACTIVE]))
|
||||
return MOTION_SLOT_IDLE;
|
||||
|
||||
if (top())
|
||||
if (_slot[MOTION_SLOT_ACTIVE])
|
||||
return MOTION_SLOT_ACTIVE;
|
||||
|
||||
return MAX_MOTION_SLOT;
|
||||
|
||||
Reference in new issue
Block a user