diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp index e515ff54a4..917e535efe 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp @@ -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; } @@ -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; } diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp index 65439088f0..45f7f19e16 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp @@ -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; diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp index 2200bfd823..ca70355e24 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp @@ -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; } @@ -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; } diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp index 5c761a654c..a9f5483f20 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp @@ -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;