Skip to content

Commit e6339f0

Browse files
authored
[GEN][ZH] Fix instant money drop on USA Supply Drop Zone completion when subdued while under construction (#1281)
1 parent 11f49db commit e6339f0

File tree

2 files changed

+22
-0
lines changed
  • GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update
  • Generals/Code/GameEngine/Source/GameLogic/Object/Update

2 files changed

+22
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,17 @@ OCLUpdate::~OCLUpdate( void )
8282
//-------------------------------------------------------------------------------------------------
8383
UpdateSleepTime OCLUpdate::update( void )
8484
{
85+
#if !RETAIL_COMPATIBLE_CRC
86+
// TheSuperHackers @bugfix dizzyj/Caball009/Mauller 14/07/2025 prevent triggering supply drop when subdued while under construction
87+
// When the construction is finished, we allow the timer to be initialized and then start shifting the timer while subdued
88+
if ( m_timerStartedFrame > 0 && getObject()->isDisabled() )
89+
{
90+
m_nextCreationFrame++;
91+
m_timerStartedFrame++;
92+
return UPDATE_SLEEP_NONE;
93+
}
94+
#endif
95+
8596
/// @todo srj use SLEEPY_UPDATE here
8697
if( shouldCreate() )
8798
{

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,22 @@ OCLUpdate::~OCLUpdate( void )
123123
//-------------------------------------------------------------------------------------------------
124124
UpdateSleepTime OCLUpdate::update( void )
125125
{
126+
#if RETAIL_COMPATIBLE_CRC
126127
if( getObject()->isDisabled() )
127128
{
128129
m_nextCreationFrame++;
129130
return UPDATE_SLEEP_NONE;
130131
}
132+
#else
133+
// TheSuperHackers @bugfix dizzyj/Caball009/Mauller 14/07/2025 prevent triggering supply drop when subdued while under construction
134+
// When the construction is finished, we allow the timer to be initialized and then start shifting the timer while subdued
135+
if ( m_timerStartedFrame > 0 && getObject()->isDisabled() )
136+
{
137+
m_nextCreationFrame++;
138+
m_timerStartedFrame++;
139+
return UPDATE_SLEEP_NONE;
140+
}
141+
#endif
131142

132143
const OCLUpdateModuleData *data = getOCLUpdateModuleData();
133144

0 commit comments

Comments
 (0)