diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp index 92936c3fd97..65439088f09 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp @@ -884,9 +884,9 @@ UnsignedInt WeaponTemplate::fireWeaponTemplate Bool handled; - if(!sourceObj->isLocallyControlled() // if user watching is not controller and - && sourceObj->testStatus(OBJECT_STATUS_STEALTHED) // if unit is stealthed (like a Pathfinder) - && !sourceObj->testStatus(OBJECT_STATUS_DETECTED) // but not detected... + // TheSuperHackers @todo: Remove hardcoded KINDOF_MINE check and apply PlayFXWhenStealthed = Yes to the mine weapons instead. + + if(!sourceObj->getDrawable()->isVisible() // if user watching cannot see us && !sourceObj->isKindOf(KINDOF_MINE) // and not a mine (which always do the FX, even if hidden)... && !isPlayFXWhenStealthed() // and not a weapon marked to playwhenstealthed ) diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp index 76648709115..5c761a654cf 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp @@ -915,10 +915,9 @@ UnsignedInt WeaponTemplate::fireWeaponTemplate Bool handled; - if(!sourceObj->isLocallyControlled() // if user watching is not controller and - && sourceObj->testStatus(OBJECT_STATUS_STEALTHED) // if unit is stealthed (like a Pathfinder) - && !sourceObj->testStatus(OBJECT_STATUS_DETECTED) // but not detected... - && !sourceObj->testStatus(OBJECT_STATUS_DISGUISED) // and not disguised... + // TheSuperHackers @todo: Remove hardcoded KINDOF_MINE check and apply PlayFXWhenStealthed = Yes to the mine weapons instead. + + if(!sourceObj->getDrawable()->isVisible() // if user watching cannot see us && !sourceObj->isKindOf(KINDOF_MINE) // and not a mine (which always do the FX, even if hidden)... && !isPlayFXWhenStealthed() // and not a weapon marked to playwhenstealthed )