Skip to content

Commit 2f427b1

Browse files
authored
tweak(radar): Suppress under attack radar notification spam (TheSuperHackers#2540)
When PRESERVE_RETAIL_BEHAVIOR is not zero
1 parent 78221a0 commit 2f427b1

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • Core/GameEngine/Source/Common/System

Core/GameEngine/Source/Common/System/Radar.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,14 @@ Bool Radar::tryEvent( RadarEventType event, const Coord3D *pos )
11881188
// get distance from our new event location to this event location in 2D
11891189
const Real distSquared = sqr(m_event[ i ].worldLoc.x - pos->x) + sqr(m_event[ i ].worldLoc.y - pos->y);
11901190

1191-
if( distSquared <= closeEnoughDistanceSq )
1191+
Bool isClose = distSquared <= closeEnoughDistanceSq;
1192+
#if PRESERVE_RETAIL_BEHAVIOR
1193+
// TheSuperHackers @tweak Preserve retail map-wide suppression for under attack events
1194+
// because otherwise they trigger way too frequent from cargo planes.
1195+
isClose |= (event == RADAR_EVENT_UNDER_ATTACK);
1196+
#endif
1197+
1198+
if( isClose )
11921199
{
11931200

11941201
// finally only reject making a new event of this existing one is "recent enough"

0 commit comments

Comments
 (0)