From b607516bc8172ae0a0ef470f03091c039bf08431 Mon Sep 17 00:00:00 2001 From: Stubbjax Date: Mon, 17 Mar 2025 00:10:02 +1100 Subject: [PATCH] bugfix: Fix hardcoded cash hack value for Black Lotus --- .../GameLogic/Object/Update/SpecialAbilityUpdate.cpp | 8 ++++++-- .../GameLogic/Object/Update/SpecialAbilityUpdate.cpp | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp index 6fb139803b..c921111953 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp @@ -1339,14 +1339,18 @@ void SpecialAbilityUpdate::triggerAbilityEffect() return; } - //Steal a thousand cash from the other team! + //Steal cash from the other team! Money *targetMoney = target->getControllingPlayer()->getMoney(); Money *objectMoney = object->getControllingPlayer()->getMoney(); if( targetMoney && objectMoney ) { UnsignedInt cash = targetMoney->countMoney(); +#if RETAIL_COMPATIBLE_CRC UnsignedInt desiredAmount = 1000; - //Check to see if they have 1000 cash, otherwise, take the remainder! +#else + UnsignedInt desiredAmount = data->m_effectValue; +#endif + //Check to see if they have the cash, otherwise, take the remainder! cash = min( desiredAmount, cash ); if( cash > 0 ) { diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp index 62882cfed1..dca7890c3a 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp @@ -1485,14 +1485,18 @@ void SpecialAbilityUpdate::triggerAbilityEffect() return; } - //Steal a thousand cash from the other team! + //Steal cash from the other team! Money *targetMoney = target->getControllingPlayer()->getMoney(); Money *objectMoney = object->getControllingPlayer()->getMoney(); if( targetMoney && objectMoney ) { UnsignedInt cash = targetMoney->countMoney(); +#if RETAIL_COMPATIBLE_CRC UnsignedInt desiredAmount = 1000; - //Check to see if they have 1000 cash, otherwise, take the remainder! +#else + UnsignedInt desiredAmount = data->m_effectValue; +#endif + //Check to see if they have the cash, otherwise, take the remainder! cash = min( desiredAmount, cash ); if( cash > 0 ) {