From 9189a42c4c317b3db4a40a7486f61e45abbdc93a Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sat, 29 Aug 2020 12:07:13 +0400 Subject: [PATCH] Fix failed assertion --- apps/openmw/mwinput/mousemanager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwinput/mousemanager.cpp b/apps/openmw/mwinput/mousemanager.cpp index a3f436bfe..ac30d4487 100644 --- a/apps/openmw/mwinput/mousemanager.cpp +++ b/apps/openmw/mwinput/mousemanager.cpp @@ -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(); } }