summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2015-04-03 03:50:41 +0200
committerPaweł Redman <pawel.redman@gmail.com>2015-04-03 03:50:41 +0200
commit0d5460522ba3651da1ed5630f7f8a784c5eb6514 (patch)
tree143e3cae332ef6a31957d222fb9b9ed8e27e9f06 /src/game
parente6735d21e17ecbbe03607046ded443516b65c3a7 (diff)
Initial implementation of health bars.
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_active.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 90c47c4..2eede6b 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -2236,6 +2236,7 @@ void ClientThink( int clientNum )
void G_RunClient( gentity_t *ent )
{
+ // send all buffered damage blobs
if( ent->client->bufferedBlobCount )
{
int i;
@@ -2275,6 +2276,9 @@ void G_RunClient( gentity_t *ent )
ent->client->bufferedBlobCount = 0;
}
+ // update the public health field
+ ent->s.otherEntityNum2 = MAX( 0, ent->client->ps.stats[ STAT_HEALTH ] );
+
// Run a client think when there are no commands for a time
if( !g_synchronousClients.integer &&
( g_friendlyFreeze.integer < 100 ||