summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_cmds.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 330b5d94..47b65fbf 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -405,12 +405,13 @@ void Cmd_Give_f( gentity_t *ent )
if( give_all || Q_stricmpn( name, "funds", 5 ) == 0 )
{
float credits = atof( name + 6 );
+ const float max = MAX( ALIEN_MAX_CREDITS, HUMAN_MAX_CREDITS );
if( ent->client->pers.teamSelection == TEAM_ALIENS )
credits *= ALIEN_CREDITS_PER_KILL;
- if( give_all )
- credits = ALIEN_MAX_CREDITS;
+ if( give_all || credits > max )
+ credits = max;
G_AddCreditToClient( ent->client, credits, qtrue );
}