fix(native): filter air enemy damage MPI feed and keep repeat air hits

Hook AcesApp's local MPI proxy dispatch to drop enemy-part-damage messages (0xf104 / 0xf118, captured dynamically) whose recipient_pid does not belong to the local player or watched hero, preventing AI-vs-AI aircraft damage from leaking into the local kill feed.

Remove the mistaken !is_kill gate in hook_dispatch_hit_crit: the 5th argument from Unit::flushOffenderHitAward is a repeat-flush flag rather than a kill flag, which dropped follow-up aircraft hits because fixed-wing units flush exclusively through the timer path. Add a same-team guard to match the severe-damage hook.

Verified: MSVC build.ps1 (0 warnings in project code), check-patches (14/14) and 12/12 native module resolution on 2.61.0.37 and 2.61.0.58. Pending in-game acceptance.
This commit is contained in:
N0VAN0M4LY committed 2026-12-03 06:37:58 +08:00
1 parent 02fe867cf1
commit 638bc75724
5 files changed
+129 -6

No files matched your search

+4
View File
@@ -158,6 +158,10 @@ static const LmpValueSpec SPECS[] = {
A(DAMAGE_NOTICES, "hit_parts_feedback.enqueue_enemy_parts", enqueue_enemy_parts),
A(DAMAGE_NOTICES, "hit_parts_feedback.hit_cam_important", hit_cam_important),
A(DAMAGE_NOTICES, "hit_parts_feedback.naval_hit_state", naval_hit_state),
A(DAMAGE_NOTICES, "local_mpi_dispatch", local_mpi_dispatch),
O(DAMAGE_NOTICES, "mpi_msg_id.id_offset", mpi_msg_id_off),
O(DAMAGE_NOTICES, "enemy_part_damage_mpi.msg_id", enemy_part_dmg_mpi_id),
O(DAMAGE_NOTICES, "enemy_part_hit_mpi.msg_id", enemy_part_hit_mpi_id),
O(AIR_EVENTS, "mission_mode_name.mode_name", mis_mode_name),
A(AIR_EVENTS, "prepare_local_mission", prepare_local_mission),