diff options
author | enneract <trem.redman@gmail.com> | 2014-12-12 21:02:36 +0100 |
---|---|---|
committer | enneract <trem.redman@gmail.com> | 2014-12-12 21:02:36 +0100 |
commit | bd6fc418d171378de5de2b7450e22f70b4899b5c (patch) | |
tree | 2ed71249dd88f4ee7380eb6d7006fd78c8fd3481 | |
parent | 964371805c751877c99ed2faeb8214355c2b3d6b (diff) |
Improve BP bars' formula.
-rw-r--r-- | src/cgame/cg_draw.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index e1ee2b7..8e0b88f 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -1809,11 +1809,7 @@ static void CG_DrawBuildPoolBars( rectDef_t *rect, vec4_t color ) abp = (float)cgs.alienBuildPool / (float)cgs.alienBuildPoolMax; hbp = (float)cgs.humanBuildPool / (float)cgs.humanBuildPoolMax; - if( fabs( abp + hbp ) < 1e-3 ) - f = 0.5f; - else - f = ( ( abp - hbp ) / ( abp + hbp ) + 1.0f ) / 2.0f; - + f = ( abp - hbp + 1.0f ) / 2.0f; f = ( f < 0.0f ) ? 0.0f : ( f > 1.0f ) ? 1.0f : f; f = f * 0.55f + 0.225f; |