Skip to content

Commit c060a47

Browse files
authored
bugfix(weapon): Weapon effects now show again for hidden objects that are not explicitly stealthed (#1918)
1 parent b2afcd3 commit c060a47

File tree

2 files changed

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

2 files changed

+2
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,7 @@ UnsignedInt WeaponTemplate::fireWeaponTemplate
890890
const Bool isVisible = outerDrawable && outerDrawable->isVisible();
891891

892892
if (!isVisible // if user watching cannot see us
893+
&& sourceObj->testStatus(OBJECT_STATUS_STEALTHED) // if unit is stealthed (like a Pathfinder)
893894
&& !sourceObj->isKindOf(KINDOF_MINE) // and not a mine (which always do the FX, even if hidden)...
894895
&& !isPlayFXWhenStealthed() // and not a weapon marked to playwhenstealthed
895896
)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,7 @@ UnsignedInt WeaponTemplate::fireWeaponTemplate
921921
const Bool isVisible = outerDrawable && outerDrawable->isVisible();
922922

923923
if (!isVisible // if user watching cannot see us
924+
&& sourceObj->testStatus(OBJECT_STATUS_STEALTHED) // if unit is stealthed (like a Pathfinder)
924925
&& !sourceObj->isKindOf(KINDOF_MINE) // and not a mine (which always do the FX, even if hidden)...
925926
&& !isPlayFXWhenStealthed() // and not a weapon marked to playwhenstealthed
926927
)

0 commit comments

Comments
 (0)