diff --git a/port/src/input.c b/port/src/input.c index 38bc1f005..fcc842fe3 100644 --- a/port/src/input.c +++ b/port/src/input.c @@ -130,6 +130,8 @@ static const char *vkJoyNames[] = { static char vkNames[VK_TOTAL_COUNT][64]; +f32 crosshairSway = 1.f; + void inputSetDefaultKeyBinds(void) { // TODO: make VK constants for all these @@ -459,6 +461,8 @@ s32 inputInit(void) inputLoadBinds(); + crosshairSway = configGetFloat("Input.CrosshairSway", 1.f); + return connectedMask; } diff --git a/src/game/bondmove.c b/src/game/bondmove.c index ce7d29e58..1673d6edb 100644 --- a/src/game/bondmove.c +++ b/src/game/bondmove.c @@ -1999,8 +1999,8 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i xscale = 1.f; yscale = 1.f; } - x = g_Vars.currentplayer->speedtheta * 0.3f * xscale + g_Vars.currentplayer->gunextraaimx; - y = -g_Vars.currentplayer->speedverta * 0.1f * yscale + g_Vars.currentplayer->gunextraaimy; + x = g_Vars.currentplayer->speedtheta * 0.3f * crosshairSway * xscale + g_Vars.currentplayer->gunextraaimx; + y = -g_Vars.currentplayer->speedverta * 0.1f * crosshairSway * yscale + g_Vars.currentplayer->gunextraaimy; #endif bgunSwivelWithDamp(x, y, PAL ? 0.955f : 0.963f); diff --git a/src/include/game/bondmove.h b/src/include/game/bondmove.h index 7733b613f..beb4f75c5 100644 --- a/src/include/game/bondmove.h +++ b/src/include/game/bondmove.h @@ -4,6 +4,10 @@ #include "data.h" #include "types.h" +#ifndef PLATFORM_N64 +extern f32 crosshairSway; +#endif + void bmoveSetControlDef(u32 controldef); void bmoveSetAutoMoveCentreEnabled(bool enabled); void bmoveSetAutoAimY(bool enabled);