From db73636f5eb2c89b18ae2b71e38c2c22b8d2e29d Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 14 Apr 2024 20:54:03 +0100 Subject: [PATCH] Fix attract title logo slidein (resolves #1273) - V_SLIDEIN: For (G_IsTitleCardAvailable == false)/(versus at map start == true) contexts, use timeinmap instead of leveltime - Don't reset timeinmap when reloading gamestate, so it's more functionally equivalent to lt_ticker These two changes also fix the hypothetical issue of titlecard-less custom gametypes having weird HUD state on late netgame join. Timeinmap is exclusively used for HUD, as is st_fadein. timeinmap also doesn't increment under g_fastforward, therefore the best candidate to tie together --- src/p_setup.cpp | 4 +++- src/st_stuff.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 4bb950d8e..8a9598174 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -7645,7 +7645,9 @@ static void P_InitLevelSettings(void) // circuit, race and competition stuff numcheatchecks = 0; - timeinmap = 0; + + if (!g_reloadinggamestate) + timeinmap = 0; // special stage stagefailed = true; // assume failed unless proven otherwise - P_GiveEmerald or emerald touchspecial diff --git a/src/st_stuff.c b/src/st_stuff.c index 28c691f13..21e0669b1 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1516,10 +1516,10 @@ static fixed_t ST_CalculateFadeIn(player_t *player) if (K_CheckBossIntro() == true || G_IsTitleCardAvailable() == false) { - if (leveltime <= 16) + if (timeinmap <= 16) timer = 0; else - timer = leveltime-16; + timer = timeinmap-16; } if (timer < length)