Commit d33fa42
Fix #2452: Per-object cooldown for under-attack radar alarm
Each object now tracks the last logic frame its under-attack alarm fired.
A new alarm from the same object is suppressed until 10 seconds have elapsed,
regardless of what other objects are doing.
This replaces the map-wide PRESERVE_RADAR_WARNING_SUPPRESSION workaround
(which could suppress a legitimate base-under-attack warning because a cargo
plane's alarm had fired moments earlier). With per-object cooldown each unit
is silenced independently, so simultaneous attacks at different locations each
report correctly while a single continuously-hit unit (e.g. supply plane)
cannot spam the alarm every 10 seconds.
PRESERVE_RADAR_WARNING_SUPPRESSION is set to 0; the area-based 250-unit radius
suppression in tryEvent handles the case of multiple units in the same locale.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent f7d680f commit d33fa42
3 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
1046 | 1047 | | |
1047 | 1048 | | |
1048 | 1049 | | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
1049 | 1059 | | |
1050 | 1060 | | |
1051 | 1061 | | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
1052 | 1065 | | |
1053 | 1066 | | |
1054 | 1067 | | |
| |||
0 commit comments