diff options
author | Mikko Tiusanen <ams@daug.net> | 2015-01-20 21:13:45 +0200 |
---|---|---|
committer | Mikko Tiusanen <ams@daug.net> | 2015-01-20 21:13:45 +0200 |
commit | 67948a489d2a07b94b6d5a3eeb2b642146865a61 (patch) | |
tree | b60d242f72eeef659a70af614cf092cab405a9f8 /src/game/g_active.c | |
parent | 96bede71e66823dc28a57935e48e4cc7b17f55af (diff) |
Fixed use of uninitialized variable in adv.dretch infection spread check.
Diffstat (limited to 'src/game/g_active.c')
-rw-r--r-- | src/game/g_active.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c index 951a3a9..d5dfd21 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -301,16 +301,15 @@ static qboolean ClientIsOnMedi( gclient_t *cl ) { static void ClientContagion( gentity_t *ent, gentity_t *other ) { gclient_t *c1 = ent->client, *c2; - gclient_t *client; qboolean poisoned1 = c1->ps.stats[ STAT_STATE ] & SS_POISONED, poisoned2; int expiryTime; - if( ( c1->pers.teamSelection != TEAM_HUMANS ) || - ( c1->poisonImmunityTime >= level.time ) || - ClientIsOnMedi(c1) ) - return; + if( ( c1->pers.teamSelection != TEAM_HUMANS ) || + ( c1->poisonImmunityTime >= level.time ) || + ClientIsOnMedi(c1) ) + return; - if( other->client && !BG_InventoryContainsUpgrade( UP_BIOKIT, client->ps.stats ) ) { + if( other->client && !BG_InventoryContainsUpgrade( UP_BIOKIT, c1->ps.stats ) ) { // touching another human c2 = other->client; poisoned2 = c2->ps.stats[ STAT_STATE ] & SS_POISONED; @@ -381,10 +380,9 @@ void ClientImpacts( gentity_t *ent, pmove_t *pm ) if( ent->client && other->client ) ClientShove( ent, other ); - // spread poison + // spread poison if( ent->client ) ClientContagion( ent, other ); - // touch triggers if( other->touch ) |