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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index 847d8988..d5e6f2f7 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -259,6 +259,9 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
//add credit
player->client->ps.persistant[ PERS_CREDIT ] += (int)( (float)classValue * ( numerator / denominator ) );
+
+ if( player->client->ps.persistant[ PERS_CREDIT ] > HUMAN_MAX_CREDITS )
+ player->client->ps.persistant[ PERS_CREDIT ] = HUMAN_MAX_CREDITS;
}
}
}
@@ -267,6 +270,9 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
self->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
{
attacker->client->ps.persistant[ PERS_CREDIT ]++;
+
+ if( attacker->client->ps.persistant[ PERS_CREDIT ] > HUMAN_MAX_CREDITS )
+ attacker->client->ps.persistant[ PERS_CREDIT ] = HUMAN_MAX_CREDITS;
}
// Add team bonuses