Skip to content

Commit 4d4dec7

Browse files
authored
Fix #2654: Uncap money serverside (#2655)
1 parent e5026e7 commit 4d4dec7

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3049,12 +3049,12 @@ bool CStaticFunctionDefinitions::SetPlayerMoney(CElement* pElement, long lMoney,
30493049
{
30503050
CPlayer* pPlayer = static_cast<CPlayer*>(pElement);
30513051

3052-
// Is it above 99999999? Limit it to it
3053-
if (lMoney > 99999999)
3054-
lMoney = 99999999;
3055-
// Is it below -99999999?
3056-
else if (lMoney < -99999999)
3057-
lMoney = -99999999;
3052+
// Is it above 999999999? Limit it to it
3053+
if (lMoney > 999999999)
3054+
lMoney = 999999999;
3055+
// Is it below -999999999?
3056+
else if (lMoney < -999999999)
3057+
lMoney = -999999999;
30583058

30593059
// Tell him his new money
30603060
CBitStream BitStream;
@@ -3079,19 +3079,19 @@ bool CStaticFunctionDefinitions::GivePlayerMoney(CElement* pElement, long lMoney
30793079
{
30803080
CPlayer* pPlayer = static_cast<CPlayer*>(pElement);
30813081

3082-
// Is it above 99999999? Limit it to it
3083-
if (lMoney > 99999999)
3084-
lMoney = 99999999;
3085-
// Is it below -99999999?
3086-
else if (lMoney < -99999999)
3087-
lMoney = -99999999;
3082+
// Is it above 999999999? Limit it to it
3083+
if (lMoney > 999999999)
3084+
lMoney = 999999999;
3085+
// Is it below -999999999?
3086+
else if (lMoney < -999999999)
3087+
lMoney = -999999999;
30883088

3089-
// Calculate his new money, if it exceeds 8 digits, set it to 99999999
3089+
// Calculate his new money, if it exceeds 9 digits, set it to 999999999
30903090
long lNewMoney = pPlayer->GetMoney() + lMoney;
3091-
if (lNewMoney > 99999999)
3092-
lNewMoney = 99999999;
3093-
else if (lNewMoney < -99999999)
3094-
lNewMoney = -99999999;
3091+
if (lNewMoney > 999999999)
3092+
lNewMoney = 999999999;
3093+
else if (lNewMoney < -999999999)
3094+
lNewMoney = -999999999;
30953095

30963096
// Tell him his new money
30973097
CBitStream BitStream;

0 commit comments

Comments
 (0)