Commit b2a43b5
committed
fix: track static weapon shots bypassing FiredMan (ACE CSW compat)
ACE Crew Served Weapons fires static weapons via forceWeaponFire on
the vehicle, which may not trigger the unit's FiredMan EH that OCAP
relies on. For mortars with allowFireOnLoad, ACE also creates a
temporary AI agent as gunner when the seat is empty (solo mortar use),
and this agent has no OCAP ID.
Add a StaticWeapon Fired class EH as fallback that catches
vehicle-level firing events, resolves the gunner, and forwards to the
existing tracking handlers. When the gunner is an ACE CSW agent (no
OCAP ID), falls back to ace_csw_reloader to attribute the shot to the
actual player who loaded the weapon.
A dedup guard in eh_fired_client prevents double-tracking when both
FiredMan and the vehicle Fired EH fire for the same projectile.1 parent 7eca09e commit b2a43b5
2 files changed
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
128 | 160 | | |
129 | 161 | | |
130 | 162 | | |
| |||
0 commit comments