diff --git a/source/blood/src/controls.cpp b/source/blood/src/controls.cpp index cb12e93e9..0bf34033b 100644 --- a/source/blood/src/controls.cpp +++ b/source/blood/src/controls.cpp @@ -99,7 +99,7 @@ void ctrlGetInput(void) ApplyGlobalInput(gInput, &info); - bool mouseaim = !!(gInput.actions & SB_AIMMODE); + bool mouseaim = !(gInput.actions & SB_AIMMODE); if (!mouseaim) gInput.actions |= SB_CENTERVIEW; if (buttonMap.ButtonDown(gamefunc_Shrink_Screen)) diff --git a/source/core/inputstate.cpp b/source/core/inputstate.cpp index ec42d328f..2a0929f5d 100644 --- a/source/core/inputstate.cpp +++ b/source/core/inputstate.cpp @@ -383,7 +383,7 @@ void ApplyGlobalInput(InputPacket& input, ControlInfo *info) if (G_CheckAutorun(buttonMap.ButtonDown(gamefunc_Run))) input.actions |= SB_RUN; - if (in_mousemode || buttonMap.ButtonDown(gamefunc_Mouse_Aiming)) + if (!in_mousemode && !buttonMap.ButtonDown(gamefunc_Mouse_Aiming)) input.actions |= SB_AIMMODE; if (buttonMap.ButtonDown(gamefunc_Look_Up)) diff --git a/source/exhumed/src/input.cpp b/source/exhumed/src/input.cpp index 451e4aab3..e52ce1cb6 100644 --- a/source/exhumed/src/input.cpp +++ b/source/exhumed/src/input.cpp @@ -165,7 +165,7 @@ void PlayerInterruptKeys(bool after) input_angle = fix16_sadd(input_angle, fix16_from_dbl(scaleAdjustmentToInterval(info.dyaw))); } - bool mouseaim = !!(localInput.actions & SB_AIMMODE); + bool mouseaim = !(localInput.actions & SB_AIMMODE); if (mouseaim) tempinput.q16horz = fix16_sadd(tempinput.q16horz, fix16_from_float(info.mousey)); diff --git a/source/games/duke/src/input.cpp b/source/games/duke/src/input.cpp index 0780c8bc7..0eb8bcdaf 100644 --- a/source/games/duke/src/input.cpp +++ b/source/games/duke/src/input.cpp @@ -114,7 +114,7 @@ void hud_input(int snum) p = &ps[snum]; i = p->aim_mode; - p->aim_mode = PlayerInput(snum, SB_AIMMODE); + p->aim_mode = !PlayerInput(snum, SB_AIMMODE); if (p->aim_mode < i) p->return_to_center = 9; @@ -637,7 +637,7 @@ int getticssincelastupdate() static void processMovement(player_struct *p, InputPacket &input, ControlInfo &info, double scaleFactor) { - bool mouseaim = !!(loc.actions & SB_AIMMODE); + bool mouseaim = !(loc.actions & SB_AIMMODE); // JBF: Run key behaviour is selectable int running = !!(loc.actions & SB_RUN); diff --git a/source/sw/src/input.cpp b/source/sw/src/input.cpp index cc7c48915..89195eaa2 100644 --- a/source/sw/src/input.cpp +++ b/source/sw/src/input.cpp @@ -113,7 +113,7 @@ getinput(InputPacket *loc, SWBOOL tied) ApplyGlobalInput(*loc, &info); - bool mouseaim = !!(loc->actions & SB_AIMMODE); + bool mouseaim = !(loc->actions & SB_AIMMODE); if (!CommEnabled) {