diff options
Diffstat (limited to 'src/cgame/cg_draw.c')
-rw-r--r-- | src/cgame/cg_draw.c | 8 |
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 ); |