Avoid skidding in wrong direction.

It was possible when kart speed was near getSkidMinSpeed() when you left up left/right key, because skidding key was autorepeating.
This commit is contained in:
Deve 2018-12-15 23:04:08 +01:00
parent 3fa4fa0e54
commit 3dffb6c480

View File

@ -222,15 +222,21 @@ bool PlayerController::action(PlayerAction action, int value, bool dry_run)
break;
case PA_DRIFT:
if (value == 0)
{
SET_OR_TEST_GETTER(SkidControl, KartControl::SC_NONE);
else
}
else if (m_controls->getSkidControl() == KartControl::SC_NONE)
{
if (m_steer_val == 0)
{
SET_OR_TEST_GETTER(SkidControl, KartControl::SC_NO_DIRECTION);
}
else
{
SET_OR_TEST_GETTER(SkidControl, m_steer_val<0
? KartControl::SC_RIGHT
: KartControl::SC_LEFT );
}
}
break;
case PA_PAUSE_RACE: