summaryrefslogtreecommitdiff
path: root/src/cgame/cg_draw.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2004-05-16 01:37:02 +0000
committerTim Angus <tim@ngus.net>2004-05-16 01:37:02 +0000
commit95bc884481782639f876671336e404a1b83f5d8c (patch)
tree7e6f263066b8fb0f6c0d7e59806ea073d0bf55cc /src/cgame/cg_draw.c
parent127ade46d41e599b55d4359eae5eebf69f638aee (diff)
* Fixed the gigantic spawn queue fuck up
Diffstat (limited to 'src/cgame/cg_draw.c')
-rw-r--r--src/cgame/cg_draw.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index eb098793..6ca952e0 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -731,6 +731,10 @@ static void CG_DrawPlayerClipsRing( rectDef_t *rect, vec4_t color, qhandle_t sha
case WP_HBUILD:
case WP_HBUILD2:
maxDelay = (float)BG_FindBuildDelayForWeapon( cent->currentState.weapon );
+
+ if( buildTime > maxDelay )
+ buildTime = maxDelay;
+
progress = ( maxDelay - buildTime ) / maxDelay;
color[ 3 ] = HH_MIN_ALPHA + ( progress * HH_ALPHA_DIFF );
@@ -768,6 +772,10 @@ static void CG_DrawPlayerBuildTimerRing( rectDef_t *rect, vec4_t color, qhandle_
cent = &cg_entities[ cg.snap->ps.clientNum ];
maxDelay = (float)BG_FindBuildDelayForWeapon( cent->currentState.weapon );
+
+ if( buildTime > maxDelay )
+ buildTime = maxDelay;
+
progress = ( maxDelay - buildTime ) / maxDelay;
color[ 3 ] = AH_MIN_ALPHA + ( progress * AH_ALPHA_DIFF );