From ee1b5e8ea0e15787c3730a496cf99237187f4e78 Mon Sep 17 00:00:00 2001 From: Indev Date: Fri, 12 Jun 2026 16:47:55 +0300 Subject: [PATCH] Fix JoyAxis and InputDown inputs being off by one, this fixes lookback only working for p1 (ty lug <3) --- src/p_tick.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/p_tick.c b/src/p_tick.c index 51aa89487..3692f9205 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -614,12 +614,11 @@ void P_Ticker(boolean run) // Lookback is normally handled inside G_BuildTiccmd, which isn't called in replays so we're doing that manually // idk if this is best place to handle this tho... - // TODO - make it actually work for players other than player 1, other splitscreen players still ignore camspin for some reason - for (INT32 i = 0; i <= splitscreen; ++i) + for (i = 0; i <= splitscreen; ++i) { const boolean usejoystick = cv_usejoystick[i].value; - INT32 axis = JoyAxis(AXISLOOKBACK, i); - camspin[i] = (InputDown(gc_lookback, i) || (usejoystick && axis > 0)); + INT32 axis = JoyAxis(AXISLOOKBACK, i+1); + camspin[i] = (InputDown(gc_lookback, i+1) || (usejoystick && axis > 0)); } }