The stock control-loss hints are pushed as HUD_MSG_DAMAGE with the text chosen by a HUD text index, not by the damaged handler, so the barrel and breech filter in local_mp_damage_notifications never saw them. The hint refresh describes the unit in the hero manager's current-hero cell, one process-wide slot that can be left on another unit on a LocalMP host. Hook the HUD_MSG_DAMAGE delivery (2.61.0.37 0x19b1030, 2.61.0.43 0x19b6ba0) and drop hints with text indices 261..283 whose described unit is not the unit the local MPlayer controls. Suppressed hints are logged up to 12 times so a filter that never fires is visible in wto_ws.log. Checked: native DLL build; check-patches on 2.61.0.37; temporary copy builds of 2.61.0.37 and 2.61.0.43 report the executable, GUI and native patches all ready (11 native modules). In-game acceptance is pending.
88 lines
4.7 KiB
C
88 lines
4.7 KiB
C
/*
|
|
* What the LocalMP modules need from aces.exe, as resolved by the build (patches/native/*.jsonc,
|
|
* @wto/patcher native-resolve.ts) and handed over in wto_ws.cfg. Nothing here is a constant of a
|
|
* game build: functions and globals are absolute addresses in this process, structure offsets are
|
|
* what the definitions captured from the code.
|
|
*
|
|
* lmp_values_load(module) fills the fields of one module (local_mp_values.c); a module whose values
|
|
* are not all present is left off. The build only writes the values of modules that resolved
|
|
* completely together with the modules they require.
|
|
*/
|
|
#pragma once
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
typedef struct LmpValues {
|
|
/* local_mp_core */
|
|
uint8_t *do_respawn_player, *get_player_country, *refl_dtor, *aircraft_change_result, *set_player_gui_state;
|
|
uint8_t *get_unit_by_eid, *set_owning_mplayer, *iground_on_dead, *datablock_get_str, *datablock_set_from;
|
|
uint8_t *mp_construct_local, *gui_state_update, *unit_change_aircraft, *dagmem_alloc;
|
|
uint8_t *multiplayer, *app, *local_mplayer, *hero, *mission_settings, *stdmem, *player_count, *player_table;
|
|
size_t mp_is_host, mp_is_local_mp, mp_chat_host, mp_pid, mp_user_id, mp_team, mp_broken_slots, mp_unit_eid;
|
|
size_t match_team, app_score_rules, app_econ_holder, econ_state, econ_change_req;
|
|
size_t unit_type, unit_mplayer, unit_info, unit_info_name, mis_custom_bots;
|
|
|
|
/* local_mp_players */
|
|
uint8_t *mplayer_init_matching, *is_slot_ready_at_host;
|
|
size_t mp_gui_state, mp_used_spares, mis_allies_country, mis_axis_country, mis_arcade_country;
|
|
|
|
/* local_mp_loadout */
|
|
uint8_t *sem_change_aircraft_send, *refl_ctor, *datablock_dtor, *bullet_vec_assign, *get_decals_blk;
|
|
uint8_t *get_attachables_blk, *str_hash_fnv1, *namemap_add_name_id, *crew_skills_init;
|
|
size_t refl_bullets, refl_disabled_mods, refl_enabled_mods, refl_custom_preset, refl_attachables, refl_decals;
|
|
size_t refl_custom_skin, refl_skin, refl_weapon, refl_unit, refl_flags, refl_gun_convergence;
|
|
size_t refl_vertical_targeting, refl_bomb_fuse, refl_fuel;
|
|
size_t mp_resp_base_id, mp_spawn_delay_a, mp_spawn_delay_b, mp_spawn_pos_x, mp_spawn_pos_y, mp_spawn_pos_z;
|
|
/* Change request members: captured as offsets in the economic state, used relative to the request. */
|
|
size_t econ_req_slot_id, econ_req_bullets_begin, econ_req_bullets_end;
|
|
size_t req_slot_id, req_bullets_begin, req_bullets_end;
|
|
size_t unit_crew_skills;
|
|
|
|
/* local_mp_actions */
|
|
uint8_t *mp_init_chat;
|
|
size_t mp_chat, mp_team1_countries, mp_team2_countries;
|
|
|
|
/* local_mp_awards */
|
|
uint8_t *blk_ctor, *blk_set_str, *blk_to_owned, *blk_set_int, *hud_notify_script, *blk_dtor, *game_save_data;
|
|
size_t gsd_hud_queue, unit_info_exp_class;
|
|
|
|
/* local_mp_scores */
|
|
uint8_t *datablock_get_real;
|
|
size_t mis_custom_score_params;
|
|
|
|
/* local_mp_kills */
|
|
uint8_t *mplayer_add_score, *net_mark_dirty, *on_unit_dead_once, *iground_award_assists;
|
|
size_t mp_score, mp_stat_dirty, mp_stat_payload, unit_skip_kill, unit_severe_idx, unit_severe_uid, unit_severe_pid;
|
|
size_t igm_already_dead, igm_dead_silent, igm_bailout_dead, igm_offenders_count, igm_offenders, offender_size;
|
|
size_t igm_killer, igm_killer_uid, igm_killer_pid, igm_killer_army, unit_vtf_choose_offender;
|
|
size_t unit_army, offender_army, offender_uid, offender_pid;
|
|
size_t mp_kills, mp_ground_kills, mp_human_kills, mp_naval_kills, mp_team_kills, mp_ai_kills;
|
|
size_t mp_ai_ground_kills, mp_ai_naval_kills, mp_assists, mp_deaths, mp_capture_zone, mp_fallback_score;
|
|
size_t mp_award_damage, mp_air_severe_dmg, mp_ship_severe_dmg;
|
|
|
|
/* local_mp_events */
|
|
uint8_t *dispatch_assist, *dispatch_capture_zone, *dispatch_hit_crit, *dispatch_severe_damage, *dispatch_naval_damage;
|
|
size_t offender_assist_sent;
|
|
|
|
/* local_mp_nuke */
|
|
uint8_t *shell_launch, *shell_explode, *cta_logic_action;
|
|
size_t shell_launch_record, shell_rec_instant_win, mission_vars_data, mission_vars_count, mission_var_stride;
|
|
ptrdiff_t mission_var_bias, mission_var_name_disp, mission_var_value_disp;
|
|
size_t mission_var_name, mission_var_value;
|
|
|
|
/* local_mp_support */
|
|
uint8_t *set_controlled_unit;
|
|
size_t mp_support_unit_eid, mp_support_unit_ptr;
|
|
|
|
/* local_mp_damage_notifications */
|
|
uint8_t *barrel_damage, *breech_fire_update, *barrel_notice_deliver, *breech_notice_deliver, *mplayer_controlled_unit;
|
|
uint8_t *hud_damage_deliver, *hero_unit;
|
|
size_t barrel_unit_ref, breech_unit, barrel_notice_id, breech_notice_id;
|
|
} LmpValues;
|
|
|
|
extern LmpValues g_lmp;
|
|
|
|
/* Fill the values of `module` ("local_mp_core", ...); returns 0 and logs the first missing one. */
|
|
int lmp_values_load(const char *module);
|