Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3286,6 +3286,10 @@ void AIUpdateInterface::privateAttackObject( Object *victim, Int maxShotsToFire,

if (!victim)
{
#if !RETAIL_COMPATIBLE_CRC
// TheSuperHackers @bugfix bobtista Reset weapons lock to fix patriot turret extended range bug
getObject()->releaseWeaponLock(LOCKED_TEMPORARILY);
#endif
// Hard to kill em if they're already dead. jba
return;
}
Expand All @@ -3305,6 +3309,10 @@ void AIUpdateInterface::privateAttackObject( Object *victim, Int maxShotsToFire,
void AIUpdateInterface::privateForceAttackObject( Object *victim, Int maxShotsToFire, CommandSourceType cmdSource )
{
if (!victim) {
#if !RETAIL_COMPATIBLE_CRC
// TheSuperHackers @bugfix bobtista Reset weapons lock to fix patriot turret extended range bug
getObject()->releaseWeaponLock(LOCKED_TEMPORARILY);
#endif
return;
}

Expand Down
6 changes: 6 additions & 0 deletions Generals/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2746,6 +2746,12 @@ static void makeAssistanceRequest( Object *requestOf, void *userData )
if( requestOf == requestData->m_requestingObject )
return;

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

// Only request of our kind of people
if( !requestOf->getTemplate()->isEquivalentTo( requestData->m_requestingObject->getTemplate() ) )
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3427,6 +3427,10 @@ void AIUpdateInterface::privateAttackObject( Object *victim, Int maxShotsToFire,

if (!victim)
{
#if !RETAIL_COMPATIBLE_CRC
// TheSuperHackers @bugfix bobtista Reset weapons lock to fix patriot turret extended range bug
getObject()->releaseWeaponLock(LOCKED_TEMPORARILY);
#endif
// Hard to kill em if they're already dead. jba
return;
}
Expand All @@ -3446,6 +3450,10 @@ void AIUpdateInterface::privateAttackObject( Object *victim, Int maxShotsToFire,
void AIUpdateInterface::privateForceAttackObject( Object *victim, Int maxShotsToFire, CommandSourceType cmdSource )
{
if (!victim) {
#if !RETAIL_COMPATIBLE_CRC
// TheSuperHackers @bugfix bobtista Reset weapons lock to fix patriot turret extended range bug
getObject()->releaseWeaponLock(LOCKED_TEMPORARILY);
#endif
return;
}

Expand Down
6 changes: 6 additions & 0 deletions GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2957,6 +2957,12 @@ static void makeAssistanceRequest( Object *requestOf, void *userData )
if( requestOf == requestData->m_requestingObject )
return;

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

// Only request of our kind of people
if( !requestOf->getTemplate()->isEquivalentTo( requestData->m_requestingObject->getTemplate() ) )
return;
Expand Down
Loading