File tree Expand file tree Collapse file tree 4 files changed +10
-0
lines changed
Core/GameEngine/Include/Common
GeneralsMD/Code/GameEngine/Source/GameLogic/Object
Generals/Code/GameEngine/Source/GameLogic/Object/Body Expand file tree Collapse file tree 4 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 2121// Note: Retail compatibility must not be broken before this project officially does.
2222// Use RETAIL_COMPATIBLE_CRC and RETAIL_COMPATIBLE_XFER_SAVE to guard breaking changes.
2323
24+ #ifndef RETAIL_COMPATIBLE_BUG
25+ #define RETAIL_COMPATIBLE_BUG (1) // Retain bugs present in retail Generals 1.08 and Zero Hour 1.04
26+ #endif
27+
2428#ifndef RETAIL_COMPATIBLE_CRC
2529#define RETAIL_COMPATIBLE_CRC (1) // Game is expected to be CRC compatible with retail Generals 1.08, Zero Hour 1.04
2630#endif
Original file line number Diff line number Diff line change @@ -593,7 +593,9 @@ 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 RETAIL_COMPATIBLE_BUG
596597 m_lastDamageTimestamp = TheGameLogic->getFrame ();
598+ #endif
597599 m_lastHealingTimestamp = TheGameLogic->getFrame ();
598600
599601 // if our health has gone UP then do run the damage module callback
Original file line number Diff line number Diff line change @@ -835,7 +835,9 @@ void ActiveBody::attemptHealing( DamageInfo *damageInfo )
835835 // (object pointer loses scope as soon as atteptdamage's caller ends)
836836 m_lastDamageInfo = *damageInfo;
837837 m_lastDamageCleared = false ;
838+ #if RETAIL_COMPATIBLE_BUG
838839 m_lastDamageTimestamp = TheGameLogic->getFrame ();
840+ #endif
839841 m_lastHealingTimestamp = TheGameLogic->getFrame ();
840842
841843 // if our health has gone UP then do run the damage module callback
Original file line number Diff line number Diff line change @@ -317,8 +317,10 @@ Bool StealthUpdate::allowedToStealth( Object *stealthOwner ) const
317317
318318 if ( flags & STEALTH_NOT_WHILE_TAKING_DAMAGE && self->getBodyModule ()->getLastDamageTimestamp () >= now - 1 )
319319 {
320+ #if RETAIL_COMPATIBLE_BUG
320321 // Only if it's not healing damage.
321322 if ( self->getBodyModule ()->getLastDamageInfo ()->in .m_damageType != DAMAGE_HEALING )
323+ #endif
322324 {
323325 // Can't stealth if we just took damage in the last frame or two.
324326 if ( self->getBodyModule ()->getLastDamageTimestamp () != 0xffffffff )
You can’t perform that action at this time.
0 commit comments