1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 06:53:53 +00:00

Merge pull request #2371 from Capostrophic/sneak

Don't toggle sneaking when controls are disabled
This commit is contained in:
Bret Curtis 2019-05-07 09:52:21 +02:00 committed by GitHub
commit e0af6532ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1395,6 +1395,7 @@ namespace MWInput
void InputManager::toggleSneaking() void InputManager::toggleSneaking()
{ {
if (MWBase::Environment::get().getWindowManager()->isGuiMode()) return; if (MWBase::Environment::get().getWindowManager()->isGuiMode()) return;
if (!mControlSwitch["playercontrols"]) return;
mSneaking = !mSneaking; mSneaking = !mSneaking;
mPlayer->setSneak(mSneaking); mPlayer->setSneak(mSneaking);
} }