Skip to content

Commit a520007

Browse files
committed
bugfix: Show weapon effects of stealthed objects for allies and observers
1 parent 2e95fe2 commit a520007

File tree

2 files changed

+2
-7
lines changed
  • GeneralsMD/Code/GameEngine/Source/GameLogic/Object
  • Generals/Code/GameEngine/Source/GameLogic/Object

2 files changed

+2
-7
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -884,9 +884,7 @@ UnsignedInt WeaponTemplate::fireWeaponTemplate
884884

885885
Bool handled;
886886

887-
if(!sourceObj->isLocallyControlled() // if user watching is not controller and
888-
&& sourceObj->testStatus(OBJECT_STATUS_STEALTHED) // if unit is stealthed (like a Pathfinder)
889-
&& !sourceObj->testStatus(OBJECT_STATUS_DETECTED) // but not detected...
887+
if(!sourceObj->getDrawable()->isVisible() // if user watching cannot see us
890888
&& !sourceObj->isKindOf(KINDOF_MINE) // and not a mine (which always do the FX, even if hidden)...
891889
&& !isPlayFXWhenStealthed() // and not a weapon marked to playwhenstealthed
892890
)

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -915,10 +915,7 @@ UnsignedInt WeaponTemplate::fireWeaponTemplate
915915

916916
Bool handled;
917917

918-
if(!sourceObj->isLocallyControlled() // if user watching is not controller and
919-
&& sourceObj->testStatus(OBJECT_STATUS_STEALTHED) // if unit is stealthed (like a Pathfinder)
920-
&& !sourceObj->testStatus(OBJECT_STATUS_DETECTED) // but not detected...
921-
&& !sourceObj->testStatus(OBJECT_STATUS_DISGUISED) // and not disguised...
918+
if(!sourceObj->getDrawable()->isVisible() // if user watching cannot see us
922919
&& !sourceObj->isKindOf(KINDOF_MINE) // and not a mine (which always do the FX, even if hidden)...
923920
&& !isPlayFXWhenStealthed() // and not a weapon marked to playwhenstealthed
924921
)

0 commit comments

Comments
 (0)