From da1b4f227770541827473de1c4ca6b770b3d5b81 Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 14 Nov 2019 12:52:34 +0000 Subject: [PATCH] Disable menu input on the title screen for the first second (ie, before the flash), to guarantee people won't start the menu the very first tic after the fade and ruin the animation. (Console and gif/screenshot recording still works, for the impatient.) --- src/f_finale.c | 2 +- src/f_finale.h | 1 + src/g_game.c | 2 +- src/m_menu.c | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index 26e1d3848..fc300133d 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -45,7 +45,7 @@ // Stage of animation: // 0 = text, 1 = art screen -static INT32 finalecount; +INT32 finalecount; INT32 titlescrollxspeed = 20; INT32 titlescrollyspeed = 0; UINT8 titlemapinaction = TITLEMAP_OFF; diff --git a/src/f_finale.h b/src/f_finale.h index f75f93c77..3fa7106a9 100644 --- a/src/f_finale.h +++ b/src/f_finale.h @@ -74,6 +74,7 @@ void F_StartContinue(void); void F_ContinueTicker(void); void F_ContinueDrawer(void); +extern INT32 finalecount; extern INT32 titlescrollxspeed; extern INT32 titlescrollyspeed; diff --git a/src/g_game.c b/src/g_game.c index 9677e81c9..0c4ebcc92 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1717,7 +1717,7 @@ boolean G_Responder(event_t *ev) if (gameaction == ga_nothing && !singledemo && ((demoplayback && !modeattacking && !titledemo) || gamestate == GS_TITLESCREEN)) { - if (ev->type == ev_keydown && ev->data1 != 301) + if (ev->type == ev_keydown && ev->data1 != 301 && !(gamestate == GS_TITLESCREEN && finalecount < TICRATE)) { M_StartControlPanel(); return true; diff --git a/src/m_menu.c b/src/m_menu.c index 6a0a31bc1..e772c9421 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2985,6 +2985,9 @@ boolean M_Responder(event_t *ev) || gamestate == GS_CREDITS || gamestate == GS_EVALUATION || gamestate == GS_GAMEEND) return false; + if (gamestate == GS_TITLESCREEN && finalecount < TICRATE) + return false; + if (noFurtherInput) { // Ignore input after enter/escape/other buttons