Skip to content

Commit 1b8c7d9

Browse files
authored
bugfix(behavior): Fix hardcoded cash hack value for Black Lotus (#1601)
1 parent e2b97ae commit 1b8c7d9

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Generals/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,14 +1335,18 @@ void SpecialAbilityUpdate::triggerAbilityEffect()
13351335
return;
13361336
}
13371337

1338-
//Steal a thousand cash from the other team!
1338+
//Steal cash from the other team!
13391339
Money *targetMoney = target->getControllingPlayer()->getMoney();
13401340
Money *objectMoney = object->getControllingPlayer()->getMoney();
13411341
if( targetMoney && objectMoney )
13421342
{
13431343
UnsignedInt cash = targetMoney->countMoney();
1344+
#if RETAIL_COMPATIBLE_CRC
13441345
UnsignedInt desiredAmount = 1000;
1345-
//Check to see if they have 1000 cash, otherwise, take the remainder!
1346+
#else
1347+
UnsignedInt desiredAmount = data->m_effectValue;
1348+
#endif
1349+
//Check to see if they have the cash, otherwise, take the remainder!
13461350
cash = min( desiredAmount, cash );
13471351
if( cash > 0 )
13481352
{

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,14 +1481,18 @@ void SpecialAbilityUpdate::triggerAbilityEffect()
14811481
return;
14821482
}
14831483

1484-
//Steal a thousand cash from the other team!
1484+
//Steal cash from the other team!
14851485
Money *targetMoney = target->getControllingPlayer()->getMoney();
14861486
Money *objectMoney = object->getControllingPlayer()->getMoney();
14871487
if( targetMoney && objectMoney )
14881488
{
14891489
UnsignedInt cash = targetMoney->countMoney();
1490+
#if RETAIL_COMPATIBLE_CRC
14901491
UnsignedInt desiredAmount = 1000;
1491-
//Check to see if they have 1000 cash, otherwise, take the remainder!
1492+
#else
1493+
UnsignedInt desiredAmount = data->m_effectValue;
1494+
#endif
1495+
//Check to see if they have the cash, otherwise, take the remainder!
14921496
cash = min( desiredAmount, cash );
14931497
if( cash > 0 )
14941498
{

0 commit comments

Comments
 (0)