summaryrefslogtreecommitdiff
path: root/src/game/g_combat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_combat.c')
-rw-r--r--src/game/g_combat.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index 17ef67e8..96c9c55a 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -230,7 +230,9 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
AddScore( self, -1 );
}
- if( attacker && attacker->client && self->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
+ if( attacker && attacker->client &&
+ attacker->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS &&
+ self->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
{
int clientNum = attacker->client->ps.clientNum;
float denominator, numerator = self->credits[ clientNum ];
@@ -244,7 +246,6 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
denominator = total;
- //if this corpse has been 100% claimed destroy it
for( i = 0; i < MAX_CLIENTS; i++ )
{
player = g_entities + i;
@@ -258,6 +259,12 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
}
}
}
+ else if( attacker && attacker->client &&
+ attacker->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS &&
+ self->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
+ {
+ attacker->client->ps.persistant[ PERS_CREDIT ]++;
+ }
// Add team bonuses
//Team_FragBonuses(self, inflictor, attacker);