diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp index a9d887a612..cbac9d50ea 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp @@ -2881,6 +2881,12 @@ Bool Object::isAbleToAttack() const if( testStatus(OBJECT_STATUS_SOLD) ) return false; + // TheSuperHackers @bugfix bobtista 31/10/2025 Fixes Gatling Cannon barrels rotating despite insufficient energy. +#if !RETAIL_COMPATIBLE_CRC + if ( isKindOf( KINDOF_POWERED ) && isDisabledByType( DISABLED_UNDERPOWERED ) ) + return false; +#endif + //We can't fire if we, as a portable structure, are aptly disabled if ( isKindOf( KINDOF_PORTABLE_STRUCTURE ) || isKindOf( KINDOF_SPAWNS_ARE_THE_WEAPONS )) { @@ -4150,6 +4156,13 @@ void Object::adjustModelConditionForWeaponStatus() // we really don't care, so we just force the issue here. (This might still need tweaking for the pursue state.) conditionToSet = WSF_NONE; } + // TheSuperHackers @bugfix bobtista 11/11/2025 Prevent barrel animation when powered structures are underpowered. +#if !RETAIL_COMPATIBLE_CRC + else if ( isKindOf( KINDOF_POWERED ) && isDisabledByType( DISABLED_UNDERPOWERED ) ) + { + conditionToSet = WSF_NONE; + } +#endif else { WeaponStatus newStatus = w->getStatus(); diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp index 0d932d277e..53985fcf02 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp @@ -3200,6 +3200,12 @@ Bool Object::isAbleToAttack() const if ( isDisabledByType( DISABLED_SUBDUED ) ) return FALSE; // A Microwave Tank is cooking me + // TheSuperHackers @bugfix bobtista 31/10/2025 Fixes Gatling Cannon barrels rotating despite insufficient energy. +#if !RETAIL_COMPATIBLE_CRC + if ( isKindOf( KINDOF_POWERED ) && isDisabledByType( DISABLED_UNDERPOWERED ) ) + return false; +#endif + //We can't fire if we, as a portable structure, are aptly disabled if ( isKindOf( KINDOF_PORTABLE_STRUCTURE ) || isKindOf( KINDOF_SPAWNS_ARE_THE_WEAPONS )) { @@ -4715,6 +4721,13 @@ void Object::adjustModelConditionForWeaponStatus() // we really don't care, so we just force the issue here. (This might still need tweaking for the pursue state.) conditionToSet = WSF_NONE; } + // TheSuperHackers @bugfix bobtista 11/11/2025 Prevent barrel animation when powered structures are underpowered. +#if !RETAIL_COMPATIBLE_CRC + else if ( isKindOf( KINDOF_POWERED ) && isDisabledByType( DISABLED_UNDERPOWERED ) ) + { + conditionToSet = WSF_NONE; + } +#endif else { WeaponStatus newStatus = w->getStatus();