From: havoc Date: Sun, 21 Jan 2007 11:52:29 +0000 (+0000) Subject: fixed negative time delta problem with sbar item flashing X-Git-Tag: xonotic-v0.1.0preview~3694 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d29f1acffa2926e16ef625952c2ab2d28017f8bd;p=xonotic%2Fdarkplaces.git 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 --- 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;