Files
WT-Offline/exe-patches/battle/allow-local-host-player-respawn/patch.json
T
N0VAN0M4LY b260d2899e chore(battle): snapshot the LocalMP rework baseline
Records the uncommitted battle-session work exactly as it was left
(local service matchmaking, settlement, chat, native LocalMP hooks,
battle gui/exe patches) so the following review and rework commits
show every correction as a diff against this state.

This commit is not reviewed and is known to be incomplete: in-game
testing reported wrong settlement rewards, single-country teams,
missing random/fixed supplement slots, misattributed hit messages and
other regressions. Do not merge this branch before the rework lands.
2026-11-28 03:15:47 +08:00

44 lines
4.2 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"id": "battle/allow-local-host-player-respawn",
"title": "允许本地多人主机模式下人类玩家在对战模式(GM_DOMINATION 等)中正常刷出载具参战",
"program_behaviour": {
"stock": "Unit::onEvent(0x103fbc0)收到 0xf02f(UnitRespawnRequest)时,在 0x1044e9b-0x1044ecc 判断若为人类玩家载具且 g_multiplayer 非空,则仅允许 g_game_mode(0x7bb5060)为 3(GM_SINGLE_MISSION)或 4(GM_DYNAMIC)时跳至 0x1044f03 执行完整的出生位计算与 0xf030(UnitRespawn)派发;客户端二进制因编译期移除了专用对战服授权分支,在其它多人模式(如随机匹配的 GM_DOMINATION = 2)下无论出生点校验是否通过都会汇入 0x1044ee8,调用 setPlayerGuiState(playerId, GUI_STATE_CA_SELECT = 6) 并将载具重新置为延迟隐藏,导致玩家点击「加入战斗!」倒计时结束后无报错直接退回选车界面。",
"patched": "将 0x1044ecc 处的 2 字节条件短跳转(jb 0x1044f03)改为无条件短跳转(jmp 0x1044f03),使本地权威主机(isHost == 1;远程客户端的 0xf02f 发往远端服务端,不会在本地触发此分支)在所有对战模式下都能进入 0x1044f03 原生出生流程,按 MPlayer 记录的出生点 ID 刷出玩家载具并切入操控视角。"
},
"derivation": {
"requirement": "功能清单 K「战局任务加载与玩家出击」。玩家在重生界面选择乘员组载具与出生点并点击「加入战斗!」后,必须在所选出生点正常刷出载具进入战斗。",
"cause": "2.61.0.37 客户端 aces.exe 在 Unit::onEvent 的 0xf02f 分支中保留了完整的 0x1044f03 -> 0xfec9c0 -> 0xf030 人类玩家出生实现(供单机与联机合作单人任务/动态战役主机使用),但用 #ifdef DEDICATED_SERVER 裁掉了多人对战模式(GM_DOMINATION 等)放行路径,令 0x1044ed2 与 0x1046b61 所有分支最终均落入 0x1044ee8 退回 GUI_STATE_CA_SELECT(状态 6)。",
"lighter_options_ruled_out": [
"原生配置或任务参数:0x1044eb9 硬编码判断全局 g_game_mode 枚举是否属于 {3, 4},把对局改成 GM_SINGLE_MISSION 会破坏占点统治规则、重生点机制与计分板。",
"本地服务或界面脚本:0xf02f 由 AcesApp::tryRespawn 在本地进程内通过 MPI 回环投递至 Unit::onEvent,纯属 C++ 战局权威状态机,不经过网络服务或 Quirrel 脚本。"
],
"conclusion": "在 0x1044ecc 处将 1 字节条件跳转操作码 0x72(jb)改为 0xeb(jmp),复用紧随其后的完整 0x1044f03 人类玩家出生流程(rdx 已在 0x1044ec2 加载为 MPlayer*)。",
"if_not_applied": "玩家在 LocalMP 对局重生界面选车点击「加入战斗!」并等完倒计时后,每次都会被静默重置回 GUI_STATE_CA_SELECT,按钮恢复为「加入战斗!」,永远无法刷出载具参战。"
},
"why_this_site": [
"0x1044dfa-0x1044e8a 已在前方完成了 GUI_STATE_CA_READY(8)与开局倒计时检查,0x1044ec2 也已将 MPlayer* 装入 rdx(0x1044f03 入口所需寄存器状态已就绪)。",
"远程联机客户端在 AcesApp::tryRespawn(0xc6c3da)中将 0xf02f 发往远端主机而非本地执行,只有本地作为权威主机时才会走到 0x1044ecc。",
"仅修改 1 个字节(72 35 -> eb 35),指令长度完全不变(2 字节),不改任何寄存器、栈帧或异常展开表。"
],
"features": ["K-战局任务加载"],
"requires": [],
"evidence": [
"2.61.0.37 原版 aces.exe:AcesApp::tryRespawn 0xc6c279-0xc6c4af(投递 0xf02f),Unit::onEvent 0x103fbc0 中 0xf02f 入口 0x1042cff,模式拦截 0x1044eb9-0x1044efc,区域校验汇合点 0x1046b61-0x1046c33,完整人类出生路径 0x1044f03-0x104502c -> 0x1045c4c -> 0x1046a24(0xfec9c0 派发 0xf030)。",
"2.61.0.37 实测战斗日志(2026_11_27_07_21_47__51360.clog 154.23s):输出 \"unit respawn request received uid:44 name:tankModels/ussr_t_72b3_arena\" 后紧接着输出 \"[GUISTATE] set GUI_STATE_CA_SELECT to player 0\",未输出 \"sending unit respawn\"。"
],
"verified_on": ["2.61.0.37"],
"edit": {
"offset": 49,
"asm": [
"jmp 0x37"
],
"bytes": "eb35",
"expect_original": "7235"
}
}