forked from mirror/openmw-tes3mp
Fix rapid toggling when holding sneak button.
This commit is contained in:
parent
ba7fc8609c
commit
4f100e6870
1 changed files with 9 additions and 8 deletions
|
@ -356,6 +356,12 @@ namespace MWInput
|
||||||
case A_CycleWeaponRight:
|
case A_CycleWeaponRight:
|
||||||
MWBase::Environment::get().getWindowManager()->cycleWeapon(true);
|
MWBase::Environment::get().getWindowManager()->cycleWeapon(true);
|
||||||
break;
|
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));
|
mPlayer->setSneak(actionIsActive(A_Sneak));
|
||||||
|
}
|
||||||
|
|
||||||
if (mAttemptJump && mControlSwitch["playerjumping"])
|
if (mAttemptJump && mControlSwitch["playerjumping"])
|
||||||
{
|
{
|
||||||
|
@ -1104,6 +1104,7 @@ namespace MWInput
|
||||||
{
|
{
|
||||||
if (MWBase::Environment::get().getWindowManager()->isGuiMode()) return;
|
if (MWBase::Environment::get().getWindowManager()->isGuiMode()) return;
|
||||||
mSneaking = !mSneaking;
|
mSneaking = !mSneaking;
|
||||||
|
mPlayer->setSneak(mSneaking);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputManager::resetIdleTime()
|
void InputManager::resetIdleTime()
|
||||||
|
|
Loading…
Reference in a new issue