Skip to content

Commit 66be9c0

Browse files
committed
bugfix: Fix Gatling Cannon barrels rotating despite insufficient energy
1 parent 5dff203 commit 66be9c0

File tree

2 files changed

+8
-0
lines changed
  • GeneralsMD/Code/GameEngine/Source/GameLogic/Object
  • Generals/Code/GameEngine/Source/GameLogic/Object

2 files changed

+8
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2881,6 +2881,10 @@ Bool Object::isAbleToAttack() const
28812881
if( testStatus(OBJECT_STATUS_SOLD) )
28822882
return false;
28832883

2884+
// TheSuperHackers @bugfix bobtista 31/10/2025 Fixes Gatling Cannon barrels rotating despite insufficient energy. (#1700)
2885+
if ( isKindOf( KINDOF_POWERED ) && isDisabledByType( DISABLED_UNDERPOWERED ) )
2886+
return false;
2887+
28842888
//We can't fire if we, as a portable structure, are aptly disabled
28852889
if ( isKindOf( KINDOF_PORTABLE_STRUCTURE ) || isKindOf( KINDOF_SPAWNS_ARE_THE_WEAPONS ))
28862890
{

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3200,6 +3200,10 @@ Bool Object::isAbleToAttack() const
32003200
if ( isDisabledByType( DISABLED_SUBDUED ) )
32013201
return FALSE; // A Microwave Tank is cooking me
32023202

3203+
// TheSuperHackers @bugfix bobtista 31/10/2025 Fixes Gatling Cannon barrels rotating despite insufficient energy. (#1700)
3204+
if ( isKindOf( KINDOF_POWERED ) && isDisabledByType( DISABLED_UNDERPOWERED ) )
3205+
return false;
3206+
32033207
//We can't fire if we, as a portable structure, are aptly disabled
32043208
if ( isKindOf( KINDOF_PORTABLE_STRUCTURE ) || isKindOf( KINDOF_SPAWNS_ARE_THE_WEAPONS ))
32053209
{

0 commit comments

Comments
 (0)