summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2015-04-03 18:07:22 +0200
committerPaweł Redman <pawel.redman@gmail.com>2015-04-03 18:07:22 +0200
commit7f984114f2e19b0579e1d55e3c1a8925a88c35d0 (patch)
tree89d08c55bbd6ee8bcb035fa6226c6de9793d572d
parent9ab47e4be8337219585f59b1c28ec72bc25a5ae1 (diff)
Do not display health bars on cloaked players.
-rw-r--r--src/cgame/cg_draw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index e351b70..2c6645f 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -4003,7 +4003,7 @@ static void CG_DrawHealthBars( void )
cent = cg_entities + cg.snap->entities[ i ].number;
es = &cent->currentState;
- if( es->eFlags & EF_DEAD )
+ if( es->eFlags & ( EF_DEAD | EF_NODRAW ) )
continue;
switch( es->eType )
@@ -4018,6 +4018,9 @@ static void CG_DrawHealthBars( void )
break;
case ET_PLAYER:
+ if( es->eFlags & EF_MOVER_STOP ) // cloak
+ continue;
+
bar->value = es->otherEntityNum2;
bar->max = BG_Class( ( es->misc >> 8 ) & 0xFF )->health;
BG_ClassBoundingBox( ( es->misc >> 8 ) & 0xFF, mins, maxs, NULL, NULL, NULL );