Files
WT-Offline/patches/native/local_mp_ground_part_feedback.jsonc
T
N0VAN0M4LY 264c5c59b8 fix(hud): filter ground part feedback by player
Check the intended recipient of ground part damage messages in the LocalMP proxy. Keep the firing player's slot available when the ground model sends damage feedback directly to the HUD.

Verified both TypeScript projects, the native DLL build, executable patch checks on .37, .60, and .64, and native patch resolution on .37, .58, .60, and .64. Built .37 and .64 copies and checked local service health on .64. In-game verification is pending.
2026-12-05 22:37:50 +08:00

72 lines
2.9 KiB
JSON

// Keep the ground module damage list and damage preview tied to the firing player.
// LocalMP damage is simulated in the same process as the HUD, beyond the local server's reach.
// Other players' unicast messages and direct damage callbacks can otherwise reach the local HUD.
{
"module": "local_mp_ground_part_feedback",
"features": ["K-Player damage notices"],
"requires": ["local_mp_damage_notifications"],
"sites": {
// Stock damage application. Both profiler and validation strings reference this function.
// 2.61.0.37: 0xc116d0; 2.61.0.64: 0xc154c0.
"apply_part_damage": {
"variants": [{
"written_for": "2.61.0.37",
"locate": { "method": "string_ref", "string": "do_unit_part_damage_impl", "target": "function" }
}]
},
// The virtual ground model callback only writes the HUD part list and damage preview.
// 2.61.0.37: 0x1651140; 2.61.0.64: 0x1657cf0.
"show_ground_part_damage": {
"variants": [{
"written_for": "2.61.0.37",
"locate": { "method": "string_ref", "string": "HeavyVehicleModel__onDamagedByPlayer", "target": "function" }
}]
},
// IGroundModel::sendPartDamage routes this same damage source to its player slot.
// 2.61.0.37: 0x42c240; 2.61.0.64: 0x42c840.
"send_ground_part_damage": {
"variants": [{
"written_for": "2.61.0.37",
"locate": { "method": "string_ref", "string": "IGroundModel__sendPartDamage", "target": "function" }
}]
},
// The source player slot is read before checking the stock no-player sentinel.
// 2.61.0.37: 0x42c2a9; 2.61.0.64: 0x42c8a9.
"ground_part_damage_source": {
"variants": [{
"written_for": "2.61.0.37",
"locate": {
"method": "within",
"in": "send_ground_part_damage",
"pattern": "41 0f b6 46 ?? 3d ff 00 00 00 0f 84 ?? ?? ?? ??",
"captures": { "pid": { "offset": 4, "type": "u8" } }
}
}]
},
// Unicast constructor for the ground part index and health. The TLS address varies by build.
// 2.61.0.37: 0x42c450; 2.61.0.64: 0x42ca50.
"ground_part_damage_packet": {
"variants": [{
"written_for": "2.61.0.37",
"locate": {
"method": "signature",
"pattern": "41 56 56 57 53 48 81 ec f8 00 00 00 44 89 ce 44 89 c7 49 89 d6 89 cb 8b 05 ?? ?? ?? ?? 65 48 8b 0c 25 58 00 00 00"
}
}]
},
// The constructor writes the MPI message type to the packet header.
// 2.61.0.37: 0x42c4b4 (0xf13a); 2.61.0.64: 0x42cab4 (0xf13a).
"ground_part_damage_mpi": {
"variants": [{
"written_for": "2.61.0.37",
"locate": {
"method": "within",
"in": "ground_part_damage_packet",
"pattern": "66 c7 44 24 40 ?? ?? 48 c7 44 24 48 00 00 00 00 c7 44 24 50 00 00 00 00",
"captures": { "msg_id": { "offset": 5, "type": "u16" } }
}
}]
}
}
}