diff options
author | Ben Millwood <thebenmachine@gmail.com> | 2009-10-03 12:22:52 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:54 +0000 |
commit | 28caf713669a0608c15604fec2d084420fac4d4a (patch) | |
tree | a48107b419ba70259df458a703a1d88157e1f235 /src/game | |
parent | 2adfb7e6c05041cfc72ff89076e45b5b90541471 (diff) |
Only regenerate health while alive
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_active.c | 3 |
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 |