diff options
author | /dev/humancontroller <devhc@example.com> | 2014-07-13 19:14:11 +0200 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-03-09 13:51:13 +0100 |
commit | 0c7b64fd8051a123864b8fe813d845bfa2b066cf (patch) | |
tree | f696d4e8589207a53c8f94d0aca7f7b575328549 | |
parent | ada728867fd2691f80c6d5dc5a8ee3785bf25df1 (diff) |
clamp funds at +-30000, not SHRT_MIN/MAX
-rw-r--r-- | src/game/g_cmds.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |