1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:23:51 +00:00

Merge pull request #2996 from akortunov/master

Fix failed assertion
This commit is contained in:
Andrei Kortunov 2020-08-29 12:09:38 +04:00 committed by GitHub
commit 70e3341954
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,7 +70,6 @@ namespace MWInput
mBindingsManager->mouseMoved(arg);
MWBase::InputManager* input = MWBase::Environment::get().getInputManager();
MWBase::World* world = MWBase::Environment::get().getWorld();
input->setJoystickLastUsed(false);
input->resetIdleTime();
@ -94,6 +93,8 @@ namespace MWInput
if (mMouseLookEnabled && !input->controlsDisabled())
{
MWBase::World* world = MWBase::Environment::get().getWorld();
float x = arg.xrel * mCameraSensitivity * (mInvertX ? -1 : 1) / 256.f;
float y = arg.yrel * mCameraSensitivity * (mInvertY ? -1 : 1) * mCameraYMultiplier / 256.f;
@ -110,7 +111,7 @@ namespace MWInput
player.pitch(y);
}
else if (!input->getControlSwitch("playerlooking"))
world->disableDeferredPreviewRotation();
MWBase::Environment::get().getWorld()->disableDeferredPreviewRotation();
}
}