fix(battle): load player crew skills on LocalMP host

Unit::loadCrew previously skipped reading the player's equipped crew from
the profile whenever Multiplayer+0x60 (host flag) was non-zero, leaving
human players with default skills and no Expert/Ace bonuses. Calling
UnitCrewSkills::initFromSave after Unit::changeAircraft in the native
loadout hook ran too late to affect live vehicle crew state.

Add exe patch battle/load-local-host-player-crew to check both the host
and LocalMP flags (+0x60 and +0x61) in Unit::loadCrew so only non-LocalMP
hosts skip directly to the default crew while preserving the owner check.
Remove the late initFromSave workaround from local_mp_loadout.c (keeping
its native patch sites for compatibility with 0.1.2 hook DLLs) and add
the E-Crew skills in battle feature labels to the launcher locales.

Verified with check-patches on 2.61.0.37 (0x10025dd) and 2.61.0.58
(0x100700d), native wto_ws.dll build, launcher typecheck and build;
pending in-game verification.
This commit is contained in:
N0VAN0M4LY committed 2026-12-02 21:33:46 +08:00
1 parent 7bd17c4f74
commit 646be7afb9
8 files changed
+50 -15

No files matched your search

-2
View File
@@ -76,7 +76,6 @@ static const LmpValueSpec SPECS[] = {
A(LOADOUT, "datablock_dtor", datablock_dtor), A(LOADOUT, "bullet_vec_assign", bullet_vec_assign),
A(LOADOUT, "get_decals_blk", get_decals_blk), A(LOADOUT, "get_attachables_blk", get_attachables_blk),
A(LOADOUT, "str_hash_fnv1", str_hash_fnv1), A(LOADOUT, "namemap_add_name_id", namemap_add_name_id),
A(LOADOUT, "crew_skills_init", crew_skills_init),
O(LOADOUT, "refl_objects.bullets", refl_bullets), O(LOADOUT, "refl_objects.disabled_mods", refl_disabled_mods),
O(LOADOUT, "refl_objects.enabled_mods", refl_enabled_mods), O(LOADOUT, "refl_objects.custom_preset", refl_custom_preset),
O(LOADOUT, "refl_objects.attachables", refl_attachables), O(LOADOUT, "refl_objects.decals", refl_decals),
@@ -91,7 +90,6 @@ static const LmpValueSpec SPECS[] = {
O(LOADOUT, "change_req_slot.slot_id", econ_req_slot_id),
O(LOADOUT, "change_req_bullets.bullets_begin", econ_req_bullets_begin),
O(LOADOUT, "change_req_bullets.bullets_end", econ_req_bullets_end),
O(LOADOUT, "unit_crew_skills.crew_skills", unit_crew_skills),
A(ACTIONS, "mp_init_chat", mp_init_chat), O(ACTIONS, "mp_chat.mp_chat", mp_chat),
O(ACTIONS, "mp_team_countries.team1_countries", mp_team1_countries),