From 212409fff09b0eb189e49cdd1df2c5a524c5da85 Mon Sep 17 00:00:00 2001 From: Vasilii Rogin Date: Wed, 17 May 2023 22:02:15 +0300 Subject: [PATCH] Do not run if sneaking and always running --- src/game_mouse.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/game_mouse.cc b/src/game_mouse.cc index 9f82fcd..03816db 100644 --- a/src/game_mouse.cc +++ b/src/game_mouse.cc @@ -21,6 +21,7 @@ #include "kb.h" #include "mouse.h" #include "object.h" +#include "perk.h" #include "proto.h" #include "proto_instance.h" #include "settings.h" @@ -945,7 +946,12 @@ void _gmouse_handle_event(int mouseX, int mouseY, int mouseState) } } - _dude_run(actionPoints); + if (dudeHasState(DUDE_STATE_SNEAKING) && !perkGetRank(gDude, PERK_SILENT_RUNNING)) { + _dude_move(actionPoints); + } else { + _dude_run(actionPoints); + } + return; }