diff --git a/Generals/Code/GameEngine/Include/Common/GlobalData.h b/Generals/Code/GameEngine/Include/Common/GlobalData.h index e10943f2e4..0e59219221 100644 --- a/Generals/Code/GameEngine/Include/Common/GlobalData.h +++ b/Generals/Code/GameEngine/Include/Common/GlobalData.h @@ -410,6 +410,7 @@ class GlobalData : public SubsystemInterface // TheSuperHackers @feature L3-M 21/08/2025 toggle the money per minute display, false shows only the original current money Bool m_showMoneyPerMinute; + Bool m_allowMoneyPerMinuteForPlayer; Real m_shakeSubtleIntensity; ///< Intensity for shaking a camera with SHAKE_SUBTLE Real m_shakeNormalIntensity; ///< Intensity for shaking a camera with SHAKE_NORMAL diff --git a/Generals/Code/GameEngine/Source/Common/GlobalData.cpp b/Generals/Code/GameEngine/Source/Common/GlobalData.cpp index 4b72223877..9e573ad77b 100644 --- a/Generals/Code/GameEngine/Source/Common/GlobalData.cpp +++ b/Generals/Code/GameEngine/Source/Common/GlobalData.cpp @@ -442,6 +442,11 @@ GlobalData* GlobalData::m_theOriginal = NULL; { "CameraAudibleRadius", INI::parseReal, NULL, offsetof( GlobalData, m_cameraAudibleRadius ) }, { "GroupMoveClickToGatherAreaFactor", INI::parseReal, NULL, offsetof( GlobalData, m_groupMoveClickToGatherFactor ) }, + +#if !PRESERVE_RETAIL_BEHAVIOR + { "AllowMoneyPerMinuteForPlayer", INI::parseBool, NULL, offsetof( GlobalData, m_allowMoneyPerMinuteForPlayer ) }, +#endif + { "ShakeSubtleIntensity", INI::parseReal, NULL, offsetof( GlobalData, m_shakeSubtleIntensity ) }, { "ShakeNormalIntensity", INI::parseReal, NULL, offsetof( GlobalData, m_shakeNormalIntensity ) }, { "ShakeStrongIntensity", INI::parseReal, NULL, offsetof( GlobalData, m_shakeStrongIntensity ) }, @@ -943,6 +948,7 @@ GlobalData::GlobalData() m_gameTimeFontSize = 8; m_showMoneyPerMinute = FALSE; + m_allowMoneyPerMinuteForPlayer = FALSE; m_debugShowGraphicalFramerate = FALSE; diff --git a/Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp b/Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp index 2546482e56..3facfcb757 100644 --- a/Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp @@ -1880,8 +1880,10 @@ void InGameUI::update( void ) if( moneyPlayer) { Money *money = moneyPlayer->getMoney(); - Bool showIncome = TheGlobalData->m_showMoneyPerMinute; - if (!showIncome) + Bool wantShowIncome = TheGlobalData->m_showMoneyPerMinute; + Bool canShowIncome = TheGlobalData->m_allowMoneyPerMinuteForPlayer || TheControlBar->isObserverControlBarOn(); + Bool doShowIncome = wantShowIncome && canShowIncome; + if (!doShowIncome) { UnsignedInt currentMoney = money->countMoney(); if( lastMoney != currentMoney ) diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h index 5ff1ed4039..0ffbd28506 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h @@ -417,6 +417,7 @@ class GlobalData : public SubsystemInterface // TheSuperHackers @feature L3-M 21/08/2025 toggle the money per minute display, false shows only the original current money Bool m_showMoneyPerMinute; + Bool m_allowMoneyPerMinuteForPlayer; Real m_shakeSubtleIntensity; ///< Intensity for shaking a camera with SHAKE_SUBTLE Real m_shakeNormalIntensity; ///< Intensity for shaking a camera with SHAKE_NORMAL diff --git a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp index 071c5debeb..42f2775f74 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp @@ -442,6 +442,11 @@ GlobalData* GlobalData::m_theOriginal = NULL; { "CameraAudibleRadius", INI::parseReal, NULL, offsetof( GlobalData, m_cameraAudibleRadius ) }, { "GroupMoveClickToGatherAreaFactor", INI::parseReal, NULL, offsetof( GlobalData, m_groupMoveClickToGatherFactor ) }, + +#if !PRESERVE_RETAIL_BEHAVIOR + { "AllowMoneyPerMinuteForPlayer", INI::parseBool, NULL, offsetof( GlobalData, m_allowMoneyPerMinuteForPlayer ) }, +#endif + { "ShakeSubtleIntensity", INI::parseReal, NULL, offsetof( GlobalData, m_shakeSubtleIntensity ) }, { "ShakeNormalIntensity", INI::parseReal, NULL, offsetof( GlobalData, m_shakeNormalIntensity ) }, { "ShakeStrongIntensity", INI::parseReal, NULL, offsetof( GlobalData, m_shakeStrongIntensity ) }, @@ -952,6 +957,7 @@ GlobalData::GlobalData() m_gameTimeFontSize = 8; m_showMoneyPerMinute = FALSE; + m_allowMoneyPerMinuteForPlayer = FALSE; m_debugShowGraphicalFramerate = FALSE; diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp index e88bc58a95..c616deed95 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp @@ -1936,8 +1936,10 @@ void InGameUI::update( void ) if( moneyPlayer) { Money *money = moneyPlayer->getMoney(); - Bool showIncome = TheGlobalData->m_showMoneyPerMinute; - if (!showIncome) + Bool wantShowIncome = TheGlobalData->m_showMoneyPerMinute; + Bool canShowIncome = TheGlobalData->m_allowMoneyPerMinuteForPlayer || TheControlBar->isObserverControlBarOn(); + Bool doShowIncome = wantShowIncome && canShowIncome; + if (!doShowIncome) { UnsignedInt currentMoney = money->countMoney(); if( lastMoney != currentMoney )