diff --git a/Generals/Code/GameEngine/Include/Common/KindOf.h b/Generals/Code/GameEngine/Include/Common/KindOf.h index 6bcf42f36f0..9cae1a51c31 100644 --- a/Generals/Code/GameEngine/Include/Common/KindOf.h +++ b/Generals/Code/GameEngine/Include/Common/KindOf.h @@ -172,6 +172,10 @@ enum KindOfType CPP_11(: Int) KINDOF_CONSERVATIVE_BUILDING, ///< Conservative structures aren't considered part of your base for sneak attack boundary calculations... KINDOF_IGNORE_DOCKING_BONES, ///< Structure will not look up docking bones. Patch 1.03 hack. + // TheSuperHackers @info New kinds for Mods + + KINDOF_NO_ATTACK_WARNING, ///< does not trigger the under attack radar/EVA warning when taking damage + KINDOF_COUNT, // total number of kindofs KINDOF_FIRST = 0, }; diff --git a/Generals/Code/GameEngine/Source/Common/System/KindOf.cpp b/Generals/Code/GameEngine/Source/Common/System/KindOf.cpp index e5c20d2cfb2..eeaf355d1c3 100644 --- a/Generals/Code/GameEngine/Source/Common/System/KindOf.cpp +++ b/Generals/Code/GameEngine/Source/Common/System/KindOf.cpp @@ -161,6 +161,7 @@ const char* const KindOfMaskType::s_bitNameList[] = "DEMOTRAP", "CONSERVATIVE_BUILDING", "IGNORE_DOCKING_BONES", + "NO_ATTACK_WARNING", nullptr }; diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp index 63b25332dc2..55770f4ea0d 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp @@ -1769,7 +1769,8 @@ void Object::attemptDamage( DamageInfo *damageInfo ) damageInfo->in.m_damageType != DAMAGE_HEALING && !BitIsSet(damageInfo->in.m_sourcePlayerMask, getControllingPlayer()->getPlayerMask()) && m_radarData != nullptr && - isLocallyControlled() ) + isLocallyControlled() && + !isKindOf( KINDOF_NO_ATTACK_WARNING ) ) TheRadar->tryUnderAttackEvent( this ); } diff --git a/GeneralsMD/Code/GameEngine/Include/Common/KindOf.h b/GeneralsMD/Code/GameEngine/Include/Common/KindOf.h index 8c0956d038a..9c06da48be0 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/KindOf.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/KindOf.h @@ -172,6 +172,10 @@ enum KindOfType CPP_11(: Int) KINDOF_CONSERVATIVE_BUILDING, ///< Conservative structures aren't considered part of your base for sneak attack boundary calculations... KINDOF_IGNORE_DOCKING_BONES, ///< Structure will not look up docking bones. Patch 1.03 hack. + // TheSuperHackers @info New kinds for Mods + + KINDOF_NO_ATTACK_WARNING, ///< does not trigger the under attack radar/EVA warning when taking damage + KINDOF_COUNT, // total number of kindofs KINDOF_FIRST = 0, }; diff --git a/GeneralsMD/Code/GameEngine/Source/Common/System/KindOf.cpp b/GeneralsMD/Code/GameEngine/Source/Common/System/KindOf.cpp index fab350e998d..52dfb55658d 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/System/KindOf.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/System/KindOf.cpp @@ -161,6 +161,7 @@ const char* const KindOfMaskType::s_bitNameList[] = "DEMOTRAP", "CONSERVATIVE_BUILDING", "IGNORE_DOCKING_BONES", + "NO_ATTACK_WARNING", nullptr }; diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp index 8ddeb128638..5c35b57b38d 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp @@ -1969,7 +1969,8 @@ void Object::attemptDamage( DamageInfo *damageInfo ) getControllingPlayer() && !BitIsSet(damageInfo->in.m_sourcePlayerMask, getControllingPlayer()->getPlayerMask()) && m_radarData != nullptr && - isLocallyControlled() ) + isLocallyControlled() && + !isKindOf( KINDOF_NO_ATTACK_WARNING ) ) TheRadar->tryUnderAttackEvent( this ); }