From 0c7b64fd8051a123864b8fe813d845bfa2b066cf Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Sun, 13 Jul 2014 19:14:11 +0200 Subject: clamp funds at +-30000, not SHRT_MIN/MAX --- src/game/g_cmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/game') diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 1005c6f1..d94ea8c2 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -417,9 +417,9 @@ void Cmd_Give_f( gentity_t *ent ) TEAM_ALIENS ? ALIEN_CREDITS_PER_KILL : 1.0f ); // clamp credits manually, as G_AddCreditToClient() expects a short int - if( credits > SHRT_MAX ) + if( credits > 30000.0f ) credits = 30000.0f; - else if( credits < SHRT_MIN ) + else if( credits < -30000.0f ) credits = -30000.0f; } -- cgit