From 4225f4c20e5f04399236a242707b28dadc824e81 Mon Sep 17 00:00:00 2001 From: Shpoike Date: Thu, 6 Jul 2023 06:33:47 +0100 Subject: [PATCH] If time jumps backwards (eg cos the map took too long to start, with the server paused), don't show random images on the hud (nor potentially crash from doing so). --- Quake/sbar.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Quake/sbar.c b/Quake/sbar.c index 23f51314..9afa17a3 100644 --- a/Quake/sbar.c +++ b/Quake/sbar.c @@ -594,6 +594,11 @@ void Sbar_DrawInventory (void) { time = cl.item_gettime[i]; flashon = (int)((cl.time - time)*10); + if (flashon < 0) + { //wait what? it happened in the future? no no no! + time = 0; + cl.item_gettime[i] = cl.time; + } if (flashon >= 10) { if ( cl.stats[STAT_ACTIVEWEAPON] == (IT_SHOTGUN<