Skip to content
Open
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
13 changes: 13 additions & 0 deletions Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So previously, patriot and strat centre would also show attack mouse marker rather than disabled mouse marker?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - in retail, Patriots (and any other KINDOF_POWERED structures) would also show the attack mouse marker rather than the disabled mouse marker when underpowered.
However, the Strategy center cannon is not a powered thing, it can still force fire like a fire base without power.
I've tested these with this fix - while undepowered, the patriot and gatling cannon now correctly show the disabled mouse cursor, and the strategy center can still force fire its cannon.

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 ))
{
Expand Down Expand Up @@ -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();
Expand Down
13 changes: 13 additions & 0 deletions GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ))
{
Expand Down Expand Up @@ -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();
Expand Down
Loading