mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-02 22:11:22 +00:00
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:
parent
3cb679f310
commit
4225f4c20e
1 changed files with 5 additions and 0 deletions
|
@ -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) )
|
||||
|
|
Loading…
Reference in a new issue