Core/Movement: use better checks in GetCurrentSlot to get more reliable slot results

This commit is contained in:
Ovahlord
2020-01-10 21:09:13 +01:00
parent 8d3ce54758
commit d60fbb842e

View File

@@ -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;