diff --git a/Generals/Code/GameEngine/Source/Common/RTS/Energy.cpp b/Generals/Code/GameEngine/Source/Common/RTS/Energy.cpp index ea2708cdc85..f321b4b463d 100644 --- a/Generals/Code/GameEngine/Source/Common/RTS/Energy.cpp +++ b/Generals/Code/GameEngine/Source/Common/RTS/Energy.cpp @@ -188,6 +188,12 @@ void Energy::removePowerBonus( Object *obj ) if( obj == NULL ) return; + // TheSuperHackers @bugfix Caball009 14/11/2025 Don't remove power bonus for disabled power plants. +#if !RETAIL_COMPATIBLE_CRC + if ( obj->isDisabled() ) + return; +#endif + addProduction( -obj->getTemplate()->getEnergyBonus() ); // sanity diff --git a/GeneralsMD/Code/GameEngine/Source/Common/RTS/Energy.cpp b/GeneralsMD/Code/GameEngine/Source/Common/RTS/Energy.cpp index b1b34276e9d..a0928add8f7 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/RTS/Energy.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/RTS/Energy.cpp @@ -207,6 +207,12 @@ void Energy::removePowerBonus( Object *obj ) if( obj == NULL ) return; + // TheSuperHackers @bugfix Caball009 14/11/2025 Don't remove power bonus for disabled power plants. +#if !RETAIL_COMPATIBLE_CRC + if ( obj->isDisabled() ) + return; +#endif + addProduction( -obj->getTemplate()->getEnergyBonus() ); // sanity