Skip to content

Commit c625ff8

Browse files
committed
chore(compat): guard patriot assist fix behind CRC compatibility flag
1 parent c8c644d commit c625ff8

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3286,8 +3286,10 @@ void AIUpdateInterface::privateAttackObject( Object *victim, Int maxShotsToFire,
32863286

32873287
if (!victim)
32883288
{
3289+
#if !RETAIL_COMPATIBLE_CRC
32893290
// TheSuperHackers @bugfix bobtista Reset weapons lock to fix patriot turret extended range bug
32903291
getObject()->releaseWeaponLock(LOCKED_TEMPORARILY);
3292+
#endif
32913293
// Hard to kill em if they're already dead. jba
32923294
return;
32933295
}
@@ -3307,8 +3309,10 @@ void AIUpdateInterface::privateAttackObject( Object *victim, Int maxShotsToFire,
33073309
void AIUpdateInterface::privateForceAttackObject( Object *victim, Int maxShotsToFire, CommandSourceType cmdSource )
33083310
{
33093311
if (!victim) {
3312+
#if !RETAIL_COMPATIBLE_CRC
33103313
// TheSuperHackers @bugfix bobtista Reset weapons lock to fix patriot turret extended range bug
33113314
getObject()->releaseWeaponLock(LOCKED_TEMPORARILY);
3315+
#endif
33123316
return;
33133317
}
33143318

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2756,9 +2756,11 @@ static void makeAssistanceRequest( Object *requestOf, void *userData )
27562756
if( requestOf == requestData->m_requestingObject )
27572757
return;
27582758

2759+
#if !RETAIL_COMPATIBLE_CRC
27592760
// TheSuperHackers @bugfix bobtista Prevent patriot from assisting when it is the target
27602761
if( requestOf == requestData->m_victimObject )
27612762
return;
2763+
#endif
27622764

27632765
// Only request of our kind of people
27642766
if( !requestOf->getTemplate()->isEquivalentTo( requestData->m_requestingObject->getTemplate() ) )

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3423,8 +3423,10 @@ void AIUpdateInterface::privateAttackObject( Object *victim, Int maxShotsToFire,
34233423

34243424
if (!victim)
34253425
{
3426+
#if !RETAIL_COMPATIBLE_CRC
34263427
// TheSuperHackers @bugfix bobtista Reset weapons lock to fix patriot turret extended range bug
34273428
getObject()->releaseWeaponLock(LOCKED_TEMPORARILY);
3429+
#endif
34283430
// Hard to kill em if they're already dead. jba
34293431
return;
34303432
}
@@ -3444,8 +3446,10 @@ void AIUpdateInterface::privateAttackObject( Object *victim, Int maxShotsToFire,
34443446
void AIUpdateInterface::privateForceAttackObject( Object *victim, Int maxShotsToFire, CommandSourceType cmdSource )
34453447
{
34463448
if (!victim) {
3449+
#if !RETAIL_COMPATIBLE_CRC
34473450
// TheSuperHackers @bugfix bobtista Reset weapons lock to fix patriot turret extended range bug
34483451
getObject()->releaseWeaponLock(LOCKED_TEMPORARILY);
3452+
#endif
34493453
return;
34503454
}
34513455

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2967,9 +2967,11 @@ static void makeAssistanceRequest( Object *requestOf, void *userData )
29672967
if( requestOf == requestData->m_requestingObject )
29682968
return;
29692969

2970+
#if !RETAIL_COMPATIBLE_CRC
29702971
// TheSuperHackers @bugfix bobtista Prevent patriot from assisting when it is the target
29712972
if( requestOf == requestData->m_victimObject )
29722973
return;
2974+
#endif
29732975

29742976
// Only request of our kind of people
29752977
if( !requestOf->getTemplate()->isEquivalentTo( requestData->m_requestingObject->getTemplate() ) )

0 commit comments

Comments
 (0)