From d29f1acffa2926e16ef625952c2ab2d28017f8bd Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 21 Jan 2007 11:52:29 +0000 Subject: [PATCH] fixed negative time delta problem with sbar item flashing git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6712 d7cf8633-e32d-0410-b094-e92efae38249 --- sbar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbar.c b/sbar.c index 6bed527d..88a6ba99 100644 --- a/sbar.c +++ b/sbar.c @@ -710,7 +710,7 @@ void Sbar_DrawInventory (void) if (cl.stats[STAT_ITEMS] & (IT_SHOTGUN<= 10) { if ( cl.stats[STAT_ACTIVEWEAPON] == (IT_SHOTGUN<= 10) { @@ -1122,7 +1122,7 @@ void Sbar_Draw (void) int redflag, blueflag; // we have a max time 2s (min time = 0) - if ((time = cl.time - cl.weapontime) < 2) + if ((time = max(0, cl.time - cl.weapontime)) < 2) { fade = (1.0 - 0.5 * time); fade *= fade; -- 2.39.2