From 02a440cb75c13ca121cab6bc5c5810d31f5e6ee8 Mon Sep 17 00:00:00 2001 From: Roman Tetelman Date: Sat, 3 Oct 2009 12:20:56 +0000 Subject: * Make medistation remove poison from all players that come in contact with it not just the one who is being healed (fixes #19) --- src/game/g_buildable.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 73ffa110..587a04c9 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -1891,6 +1891,10 @@ void HMedistat_Think( gentity_t *self ) for( i = 0; i < num; i++ ) { player = &g_entities[ entityList[ i ] ]; + + //remove poison from everyone, not just the healed player + if( player->client && player->client->ps.stats[ STAT_STATE ] & SS_POISONED ) + player->client->ps.stats[ STAT_STATE ] &= ~SS_POISONED; if( self->enemy == player && player->client && player->client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS && @@ -1943,9 +1947,6 @@ void HMedistat_Think( gentity_t *self ) } else if( self->enemy && self->enemy->client ) //heal! { - if( self->enemy->client->ps.stats[ STAT_STATE ] & SS_POISONED ) - self->enemy->client->ps.stats[ STAT_STATE ] &= ~SS_POISONED; - if( self->enemy->client->ps.stats[ STAT_STAMINA ] < MAX_STAMINA ) self->enemy->client->ps.stats[ STAT_STAMINA ] += STAMINA_MEDISTAT_RESTORE; -- cgit