mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-04 02:41:19 +00:00
Fix rapid toggling when holding sneak button.
This commit is contained in:
parent
ba7fc8609c
commit
4f100e6870
@ -356,6 +356,12 @@ namespace MWInput
|
||||
case A_CycleWeaponRight:
|
||||
MWBase::Environment::get().getWindowManager()->cycleWeapon(true);
|
||||
break;
|
||||
case A_Sneak:
|
||||
if (mSneakToggles)
|
||||
{
|
||||
toggleSneaking();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -524,16 +530,10 @@ namespace MWInput
|
||||
}
|
||||
}
|
||||
|
||||
if (mSneakToggles)
|
||||
if (!mSneakToggles)
|
||||
{
|
||||
if (actionIsActive(A_Sneak))
|
||||
{
|
||||
toggleSneaking();
|
||||
mPlayer->setSneak(mSneaking);
|
||||
}
|
||||
}
|
||||
else
|
||||
mPlayer->setSneak(actionIsActive(A_Sneak));
|
||||
}
|
||||
|
||||
if (mAttemptJump && mControlSwitch["playerjumping"])
|
||||
{
|
||||
@ -1104,6 +1104,7 @@ namespace MWInput
|
||||
{
|
||||
if (MWBase::Environment::get().getWindowManager()->isGuiMode()) return;
|
||||
mSneaking = !mSneaking;
|
||||
mPlayer->setSneak(mSneaking);
|
||||
}
|
||||
|
||||
void InputManager::resetIdleTime()
|
||||
|
Loading…
Reference in New Issue
Block a user