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).

This commit is contained in:
Shpoike 2023-07-06 06:33:47 +01:00
parent 3cb679f310
commit 4225f4c20e

View file

@ -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<<i) )