From 625d79450665e3d6904f61bcc5d57629f2671824 Mon Sep 17 00:00:00 2001 From: lainon Date: Tue, 29 Nov 2022 03:49:26 +0300 Subject: [PATCH] Fixed bug with sprint on spot with weapon animation --- src/xrGame/ActorInput.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/xrGame/ActorInput.cpp b/src/xrGame/ActorInput.cpp index 8b40105dac2..e46785f2735 100644 --- a/src/xrGame/ActorInput.cpp +++ b/src/xrGame/ActorInput.cpp @@ -314,8 +314,18 @@ void CActor::IR_OnKeyboardHold(int cmd) break; case kACCEL: mstate_wishful |= mcAccel; break; - case kL_STRAFE: mstate_wishful |= mcLStrafe; break; - case kR_STRAFE: mstate_wishful |= mcRStrafe; break; + case kL_STRAFE: + { + mstate_wishful &= ~mcSprint; + mstate_wishful |= mcLStrafe; + break; + } + case kR_STRAFE: + { + mstate_wishful &= ~mcSprint; + mstate_wishful |= mcRStrafe; + break; + } case kL_LOOKOUT: mstate_wishful |= mcLLookout; break; case kR_LOOKOUT: mstate_wishful |= mcRLookout; break; case kFWD: mstate_wishful |= mcFwd; break;