From ef2a7160fa21142fe0f4d6fdac2cafa40a651c08 Mon Sep 17 00:00:00 2001 From: Alexei Dobrohotov Date: Sat, 8 Jun 2019 15:06:04 +0300 Subject: [PATCH] Fix automovement toggling on "joystick used" flag --- apps/openmw/mwinput/inputmanagerimp.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/openmw/mwinput/inputmanagerimp.cpp b/apps/openmw/mwinput/inputmanagerimp.cpp index 4b11d9af4..d66cc6577 100644 --- a/apps/openmw/mwinput/inputmanagerimp.cpp +++ b/apps/openmw/mwinput/inputmanagerimp.cpp @@ -623,11 +623,7 @@ namespace MWInput mPlayer->setAutoMove (false); mPlayer->setForwardBackward((yAxis - 0.5f) * 2 * -1); } - else if(mPlayer->getAutoMove()) - { - triedToMove = true; - mPlayer->setForwardBackward (1); - } + if (triedToMove) mJoystickLastUsed = true; @@ -649,7 +645,8 @@ namespace MWInput mPlayer->setAutoMove (false); mPlayer->setForwardBackward (actionIsActive(A_MoveForward) ? 1 : -1); } - else if(mPlayer->getAutoMove()) + + if (mPlayer->getAutoMove()) { alwaysRunAllowed = true; triedToMove = true;