From 3064b2cb7a23da02de926b21bc12a5c0989c0d54 Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 12 Sep 2022 16:01:37 +0100 Subject: [PATCH] Fixes for the replay post-game save interface (NOT THE ACTUAL REPLAYS OR HUT, THAT'LL BE LATER) - `(B) or (X)` for replay saving instead of Press Lookback (HUD) or `(Y)` (input) - Don't activate while closing pause menu if either of those buttons is shared for menu open/close --- src/p_tick.c | 2 +- src/st_stuff.c | 2 +- src/y_inter.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/p_tick.c b/src/p_tick.c index 5e60ba711..58b11406f 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -721,7 +721,7 @@ void P_Ticker(boolean run) G_WriteAllGhostTics(); if (cv_recordmultiplayerdemos.value && (demo.savemode == DSM_NOTSAVING || demo.savemode == DSM_WILLAUTOSAVE)) - if (demo.savebutton && demo.savebutton + 3*TICRATE < leveltime && G_PlayerInputDown(0, gc_y, 0)) + if (demo.savebutton && demo.savebutton + 3*TICRATE < leveltime && !menuactive && (G_PlayerInputDown(0, gc_b, 0) || G_PlayerInputDown(0, gc_x, 0))) demo.savemode = DSM_TITLEENTRY; } else if (demo.playback) // Use Ghost data for consistency checks. diff --git a/src/st_stuff.c b/src/st_stuff.c index 08e1305c1..af18b1441 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1218,7 +1218,7 @@ void ST_Drawer(void) switch (demo.savemode) { case DSM_NOTSAVING: - V_DrawRightAlignedThinString(BASEVIDWIDTH - 2, 2, V_HUDTRANS|V_SNAPTOTOP|V_SNAPTORIGHT|V_ALLOWLOWERCASE|((gametyperules & GTR_BUMPERS) ? V_REDMAP : V_SKYMAP), "Look Backward: Save replay"); + V_DrawRightAlignedThinString(BASEVIDWIDTH - 2, 2, V_HUDTRANS|V_SNAPTOTOP|V_SNAPTORIGHT|V_ALLOWLOWERCASE|((gametyperules & GTR_BUMPERS) ? V_REDMAP : V_SKYMAP), "(B) or (X): Save replay"); break; case DSM_WILLAUTOSAVE: diff --git a/src/y_inter.c b/src/y_inter.c index 89eb4010e..798ff19e9 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -592,7 +592,7 @@ skiptallydrawer: switch (demo.savemode) { case DSM_NOTSAVING: - V_DrawRightAlignedThinString(BASEVIDWIDTH - 2, 2, V_SNAPTOTOP|V_SNAPTORIGHT|V_ALLOWLOWERCASE|hilicol, "(B): Save replay"); + V_DrawRightAlignedThinString(BASEVIDWIDTH - 2, 2, V_SNAPTOTOP|V_SNAPTORIGHT|V_ALLOWLOWERCASE|hilicol, "(B) or (X): Save replay"); break; case DSM_SAVED: @@ -633,7 +633,7 @@ void Y_Ticker(void) if (demo.recording) { - if (demo.savemode == DSM_NOTSAVING && G_PlayerInputDown(0, gc_y, 0)) + if (demo.savemode == DSM_NOTSAVING && !menuactive && (G_PlayerInputDown(0, gc_b, 0) || G_PlayerInputDown(0, gc_x, 0))) demo.savemode = DSM_TITLEENTRY; if (demo.savemode == DSM_WILLSAVE || demo.savemode == DSM_WILLAUTOSAVE)