From ed16c4fd9ffd3031547871d5709c7da53a69e2c8 Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 13 Oct 2022 13:12:07 +0100 Subject: [PATCH] Simplify intermission timer code - We had two ways of ending the intermission, but only one would actually be used, and it resulted in code duplication. - Combine the two ways. - Disable the reached-but-didn't-do-anything-before-now code path for setting endtic. --- src/y_inter.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/y_inter.c b/src/y_inter.c index c1bdafd32..9abbccbd8 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -552,18 +552,8 @@ void Y_Ticker(void) intertic++; - // multiplayer uses timer (based on cv_inttime) - if (timer) - { - if (!--timer) - { - Y_EndIntermission(); - Y_FollowIntermission(); - return; - } - } - // single player is hardcoded to go away after awhile - else if (intertic == endtic) + if ((timer && !--timer) + || (intertic == endtic)) { Y_EndIntermission(); Y_FollowIntermission();