summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorBen Millwood <thebenmachine@gmail.com>2009-10-03 12:22:52 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:54 +0000
commit28caf713669a0608c15604fec2d084420fac4d4a (patch)
treea48107b419ba70259df458a703a1d88157e1f235 /src/game
parent2adfb7e6c05041cfc72ff89076e45b5b90541471 (diff)
Only regenerate health while alive
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_active.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c
index b00bbc97..1668058a 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -1403,7 +1403,8 @@ void ClientThink_real( gentity_t *ent )
{
int regenRate = BG_Class( ent->client->ps.stats[ STAT_CLASS ] )->regenRate;
- if( ent->nextRegenTime < 0 || regenRate == 0 )
+ if( !ent->client || ent->health <= 0 || ent->nextRegenTime < 0 ||
+ regenRate == 0 )
{
ent->nextRegenTime = -1;
break; // no regen