From 28caf713669a0608c15604fec2d084420fac4d4a Mon Sep 17 00:00:00 2001 From: Ben Millwood Date: Sat, 3 Oct 2009 12:22:52 +0000 Subject: Only regenerate health while alive --- src/game/g_active.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit