File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
GeneralsMD/Code/GameEngine/Source/Common/RTS
Generals/Code/GameEngine/Source/Common/RTS Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -188,12 +188,18 @@ void Energy::removePowerBonus( Object *obj )
188188 if ( obj == NULL )
189189 return ;
190190
191+ // TheSuperHackers @bugfix Caball009 14/11/2025 Don't remove power bonus for disabled power plants.
192+ #if RETAIL_COMPATIBLE_CRC
191193 addProduction ( -obj->getTemplate ()->getEnergyBonus () );
194+ #else
195+ if ( !obj->isDisabled () )
196+ addProduction ( -obj->getTemplate ()->getEnergyBonus () );
192197
193198 // sanity
194199 DEBUG_ASSERTCRASH ( m_energyProduction >= 0 && m_energyConsumption >= 0 ,
195200 (" Energy - Negative Energy numbers, Produce=%d Consume=%d\n " ,
196201 m_energyProduction, m_energyConsumption) );
202+ #endif
197203
198204}
199205
Original file line number Diff line number Diff line change @@ -207,12 +207,18 @@ void Energy::removePowerBonus( Object *obj )
207207 if ( obj == NULL )
208208 return ;
209209
210+ // TheSuperHackers @bugfix Caball009 14/11/2025 Don't remove power bonus for disabled power plants.
211+ #if RETAIL_COMPATIBLE_CRC
210212 addProduction ( -obj->getTemplate ()->getEnergyBonus () );
213+ #else
214+ if ( !obj->isDisabled () )
215+ addProduction ( -obj->getTemplate ()->getEnergyBonus () );
211216
212217 // sanity
213218 DEBUG_ASSERTCRASH ( m_energyProduction >= 0 && m_energyConsumption >= 0 ,
214219 (" Energy - Negative Energy numbers, Produce=%d Consume=%d\n " ,
215220 m_energyProduction, m_energyConsumption) );
221+ #endif
216222
217223}
218224
You can’t perform that action at this time.
0 commit comments