Skip to content

Commit 7dc2632

Browse files
authored
bugfix: Restore retail compatibility after retail behavior flags change (TheSuperHackers#2727)
1 parent 2219f63 commit 7dc2632

17 files changed

Lines changed: 19 additions & 19 deletions

File tree

Generals/Code/GameEngine/Include/Common/TunnelTracker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class TunnelTracker : public MemoryPoolObject,
6060
static void destroyObject( Object *obj, void *userData ); ///< Callback for Iterate Contained system
6161
static void healObject( Object *obj, void *frames ); ///< Callback for Iterate Contained system
6262

63-
#if PRESERVE_TUNNEL_HEAL_STACKING || RETAIL_COMPATIBLE_CRC
63+
#if RETAIL_COMPATIBLE_CRC || PRESERVE_TUNNEL_HEAL_STACKING
6464
void healObjects(Real frames); ///< heal all objects within the tunnel
6565
#else
6666
void healObjects(); ///< heal all objects within the tunnel

Generals/Code/GameEngine/Source/Common/RTS/Player.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ void Player::update()
678678
}
679679
}
680680

681-
#if !PRESERVE_TUNNEL_HEAL_STACKING && !RETAIL_COMPATIBLE_CRC
681+
#if !(RETAIL_COMPATIBLE_CRC || PRESERVE_TUNNEL_HEAL_STACKING)
682682
// TheSuperHackers @bugfix Stubbjax 26/09/2025 The Tunnel System now heals
683683
// all units once per frame instead of once per frame per Tunnel Network.
684684
TunnelTracker* tunnelSystem = getTunnelSystem();

Generals/Code/GameEngine/Source/Common/RTS/TunnelTracker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ void TunnelTracker::destroyObject( Object *obj, void * )
277277

278278
// ------------------------------------------------------------------------
279279
// heal all the objects within the tunnel system using the iterateContained function
280-
#if PRESERVE_TUNNEL_HEAL_STACKING || RETAIL_COMPATIBLE_CRC
280+
#if RETAIL_COMPATIBLE_CRC || PRESERVE_TUNNEL_HEAL_STACKING
281281
void TunnelTracker::healObjects(Real frames)
282282
{
283283
iterateContained(healObject, &frames, FALSE);
@@ -301,7 +301,7 @@ void TunnelTracker::healObject( Object *obj, void *frames)
301301
{
302302

303303
//get the number of frames to heal
304-
#if PRESERVE_TUNNEL_HEAL_STACKING || RETAIL_COMPATIBLE_CRC
304+
#if RETAIL_COMPATIBLE_CRC || PRESERVE_TUNNEL_HEAL_STACKING
305305
Real *framesForFullHeal = (Real*)frames;
306306
#else
307307
UnsignedInt* framesForFullHeal = (UnsignedInt*)frames;

Generals/Code/GameEngine/Source/GameLogic/Object/Behavior/PoisonedBehavior.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ void PoisonedBehavior::startPoisonedEffects( const DamageInfo *damageInfo )
158158

159159
// We are going to take the damage dealt by the original poisoner every so often for a while.
160160
m_poisonDamageAmount = damageInfo->out.m_actualDamageDealt;
161-
#if !RETAIL_COMPATIBLE_CRC && !PRESERVE_NO_XP_FROM_POISON_KILLS
161+
#if !(RETAIL_COMPATIBLE_CRC || PRESERVE_NO_XP_FROM_POISON_KILLS)
162162
// TheSuperHackers @bugfix Stubbjax 03/09/2025 Allow poison damage to award xp to the poison source.
163163
m_poisonSource = damageInfo->in.m_sourceID;
164164
#endif

Generals/Code/GameEngine/Source/GameLogic/Object/Body/ActiveBody.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ void ActiveBody::attemptHealing( DamageInfo *damageInfo )
593593
//(object pointer loses scope as soon as atteptdamage's caller ends)
594594
m_lastDamageInfo = *damageInfo;
595595
m_lastDamageCleared = false;
596-
#if PRESERVE_STRUCTURE_STEALTH_DURING_REPAIR
596+
#if RETAIL_COMPATIBLE_CRC || PRESERVE_STRUCTURE_STEALTH_DURING_REPAIR
597597
m_lastDamageTimestamp = TheGameLogic->getFrame();
598598
#endif
599599
m_lastHealingTimestamp = TheGameLogic->getFrame();

Generals/Code/GameEngine/Source/GameLogic/Object/Collide/CrateCollide/CrateCollide.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ CrateCollideModuleData::CrateCollideModuleData()
5050
m_executeAnimationFades = TRUE;
5151
m_isBuildingPickup = FALSE;
5252
m_isHumanOnlyPickup = FALSE;
53-
m_allowMultiPickup = (PRESERVE_MULTI_CRATE_PICKUP != 0);
53+
m_allowMultiPickup = (RETAIL_COMPATIBLE_CRC != 0 || PRESERVE_MULTI_CRATE_PICKUP != 0);
5454
m_executeFX = nullptr;
5555
m_pickupScience = SCIENCE_INVALID;
5656
m_executionAnimationTemplate = AsciiString::TheEmptyString;

Generals/Code/GameEngine/Source/GameLogic/Object/Contain/TunnelContain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ UpdateSleepTime TunnelContain::update()
437437
if (controllingPlayer)
438438
{
439439
TunnelTracker *tunnelSystem = controllingPlayer->getTunnelSystem();
440-
#if PRESERVE_TUNNEL_HEAL_STACKING || RETAIL_COMPATIBLE_CRC
440+
#if RETAIL_COMPATIBLE_CRC || PRESERVE_TUNNEL_HEAL_STACKING
441441
if (tunnelSystem)
442442
{
443443
const TunnelContainModuleData* modData = getTunnelContainModuleData();

Generals/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,7 @@ class GenericObjectCreationNugget : public ObjectCreationNugget
13401340
}
13411341
}
13421342

1343-
#if !RETAIL_COMPATIBLE_CRC && !PRESERVE_NO_XP_FROM_OCL_KILLS
1343+
#if !(RETAIL_COMPATIBLE_CRC || PRESERVE_NO_XP_FROM_OCL_KILLS)
13441344
ObjectID sinkID = sourceObj->getExperienceTracker()->getExperienceSink();
13451345
firstObject->getExperienceTracker()->setExperienceSink(sinkID != INVALID_ID ? sinkID : sourceObj->getID());
13461346
#endif

GeneralsMD/Code/GameEngine/Include/Common/TunnelTracker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class TunnelTracker : public MemoryPoolObject,
6060
static void destroyObject( Object *obj, void *userData ); ///< Callback for Iterate Contained system
6161
static void healObject( Object *obj, void *frames ); ///< Callback for Iterate Contained system
6262

63-
#if PRESERVE_TUNNEL_HEAL_STACKING || RETAIL_COMPATIBLE_CRC
63+
#if RETAIL_COMPATIBLE_CRC || PRESERVE_TUNNEL_HEAL_STACKING
6464
void healObjects(Real frames); ///< heal all objects within the tunnel
6565
#else
6666
void healObjects(); ///< heal all objects within the tunnel

GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ void Player::update()
716716
}
717717
}
718718

719-
#if !PRESERVE_TUNNEL_HEAL_STACKING && !RETAIL_COMPATIBLE_CRC
719+
#if !(RETAIL_COMPATIBLE_CRC || PRESERVE_TUNNEL_HEAL_STACKING)
720720
// TheSuperHackers @bugfix Stubbjax 26/09/2025 The Tunnel System now heals
721721
// all units once per frame instead of once per frame per Tunnel Network.
722722
TunnelTracker* tunnelSystem = getTunnelSystem();

0 commit comments

Comments
 (0)