diff --git a/Generals/Code/GameEngine/Include/Common/KindOf.h b/Generals/Code/GameEngine/Include/Common/KindOf.h index a7563273efa..f1ca7742626 100644 --- a/Generals/Code/GameEngine/Include/Common/KindOf.h +++ b/Generals/Code/GameEngine/Include/Common/KindOf.h @@ -171,6 +171,8 @@ enum KindOfType CPP_11(: Int) KINDOF_DEMOTRAP, ///< Added strictly only for disarming purposes. They don't act like mines which have rendering and selection implications! 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 TSH Kindofs + KINDOF_NO_ATTACK_WARNING, ///< does not trigger the under attack radar/EVA warning when damaged (e.g. cargo planes) 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 461e3495539..88de0177ea0 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp @@ -1760,7 +1760,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 a81d4e62870..7f6784dc2e9 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/KindOf.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/KindOf.h @@ -171,6 +171,9 @@ enum KindOfType CPP_11(: Int) KINDOF_DEMOTRAP, ///< Added strictly only for disarming purposes. They don't act like mines which have rendering and selection implications! 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 TSH Kindofs + KINDOF_NO_ATTACK_WARNING, ///< does not trigger the under attack radar/EVA warning when damaged (e.g. cargo planes) + KINDOF_UNUSED_1, ///< padding to keep KINDOF_COUNT off other BitFlags counts, replace with the next new kindof 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..08b736c4f57 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/System/KindOf.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/System/KindOf.cpp @@ -161,6 +161,8 @@ const char* const KindOfMaskType::s_bitNameList[] = "DEMOTRAP", "CONSERVATIVE_BUILDING", "IGNORE_DOCKING_BONES", + "NO_ATTACK_WARNING", + "UNUSED_1", nullptr }; diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp index 0bd898aae75..bebf68a2d70 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp @@ -1960,7 +1960,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 ); }