fix(battle): restore LocalMP Ground Arcade air events

Copy allowedKillStreaks and set useKillStreaks for Ground Arcade in battle-mission-settings.ts, and add a dedicated dynamic native module (local_mp_air_events) that preserves MissionSettings.useKillStreaks across prepare_local_mission, credits local player AI kills toward native killstreak counters, delivers UnitRespawn (0xf030) to the LocalMP host via shared unit_on_event, and recovers invalid surface poses from gameplay.blk spawnPos parameters for the match rank.

Based on PR #3 by Rivfflot, who diagnosed the LocalMP Ground Arcade air-event gaps and verified the fix in-game; refactored here onto patches/native dynamic resolution for cross-version and MSVC build compatibility.

Checked: root and launcher typecheck, MSVC native/wto-net/build.ps1, native resolution across 2.61.0.37 and 2.61.0.58 (12/12 modules), 2.61.0.58 check-patches (14/14), and temporary 2.61.0.58 copy build all passed. Pending in-game acceptance on the refactored module.

Co-authored-by: Alem Bek <[email protected]>
This commit is contained in:
N0VAN0M4LYandAlem Bek committed 2026-12-03 00:14:32 +08:00
1 parent 4999c7f5a3
commit e8122d7c6b
12 files changed
+743 -20

No files matched your search

+27 -1
View File
@@ -40,6 +40,7 @@ typedef struct LmpValueSpec {
#define NUKE "local_mp_nuke"
#define SUPPORT "local_mp_support"
#define DAMAGE_NOTICES "local_mp_damage_notifications"
#define AIR_EVENTS "local_mp_air_events"
static const LmpValueSpec SPECS[] = {
A(CORE, "do_respawn_player", do_respawn_player), O(CORE, "do_respawn_player.app_score_rules", app_score_rules),
@@ -65,6 +66,7 @@ static const LmpValueSpec SPECS[] = {
O(CORE, "unit_info_name.unit_info", unit_info), O(CORE, "unit_info_name.info_name", unit_info_name),
O(CORE, "unit_mplayer.unit_mplayer", unit_mplayer), O(CORE, "mission_custom_bots.custom_bots", mis_custom_bots),
O(CORE, "mplayer_unit_eid.unit_eid", mp_unit_eid),
A(CORE, "unit_on_event", unit_on_event),
A(PLAYERS, "mplayer_init_matching", mplayer_init_matching), A(PLAYERS, "is_slot_ready_at_host", is_slot_ready_at_host),
O(PLAYERS, "mplayer_gui_state.gui_state", mp_gui_state), O(PLAYERS, "mplayer_used_spares.used_spares", mp_used_spares),
@@ -151,11 +153,35 @@ static const LmpValueSpec SPECS[] = {
A(DAMAGE_NOTICES, "hud_damage_deliver", hud_damage_deliver),
A(DAMAGE_NOTICES, "avionics_damage", avionics_damage), O(DAMAGE_NOTICES, "avionics_damage.unit", avionics_unit),
A(DAMAGE_NOTICES, "avionics_exit_optic.call", avionics_exit_optic),
A(DAMAGE_NOTICES, "unit_on_event", unit_on_event), O(DAMAGE_NOTICES, "hit_event_offender.offender", hit_event_offender),
O(DAMAGE_NOTICES, "hit_event_offender.offender", hit_event_offender),
A(DAMAGE_NOTICES, "hit_watched_hero.watched_hero", watched_hero),
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),
O(AIR_EVENTS, "mission_mode_name.mode_name", mis_mode_name),
A(AIR_EVENTS, "prepare_local_mission", prepare_local_mission),
A(AIR_EVENTS, "prepare_local_mission_clear.use_kill_streaks", use_kill_streaks),
A(AIR_EVENTS, "kill_streak_rules.gameplay", gameplay),
O(AIR_EVENTS, "kill_streak_rules.rule_count", gp_ks_rule_count),
O(AIR_EVENTS, "kill_streak_rules.rules", gp_ks_rules),
O(AIR_EVENTS, "kill_streak_rules.rule_tag", ks_rule_tag),
A(AIR_EVENTS, "kill_streak_rules.name_map", kill_streak_name_map),
A(AIR_EVENTS, "add_kill_streak_points", add_kill_streak_points),
O(AIR_EVENTS, "mplayer_streak_progress.progress", mp_ks_progress),
O(AIR_EVENTS, "kill_streak_ai_mults.air_ai_mult", ks_rule_air_ai_mult),
O(AIR_EVENTS, "kill_streak_ai_mults.ground_ai_mult", ks_rule_ground_ai_mult),
A(AIR_EVENTS, "air_event_spawn_table.battle_center", air_event_battle_center),
O(AIR_EVENTS, "air_event_spawn_table.spawn_pos_count", ks_rule_spawn_pos_count),
A(AIR_EVENTS, "air_event_spawn_table.max_rank", mission_max_rank),
O(AIR_EVENTS, "air_event_spawn_table.spawn_pos", ks_rule_spawn_pos),
O(AIR_EVENTS, "air_event_spawn_table.spawn_pos_stride", ks_spawn_pos_stride),
O(AIR_EVENTS, "air_event_terrain.app_terrain", app_terrain),
A(AIR_EVENTS, "air_event_terrain.terrain_height", air_event_terrain_height),
A(AIR_EVENTS, "air_event_switch_unit", air_event_switch_unit),
A(AIR_EVENTS, "air_event_orientation.call", air_event_orientation),
A(AIR_EVENTS, "send_unit_respawn", send_unit_respawn),
A(AIR_EVENTS, "send_unit_respawn_broadcast.mpi_sendto", mpi_sendto),
};
static void store(const LmpValueSpec *spec, int64_t value, uint8_t *base)