// Send barrel explosion and breech misfire notices only for the locally controlled unit. // The native producers know the affected unit. The HUD receives only the type, text and ID. { "module": "local_mp_damage_notifications", "features": [ "K-Player damage notices" ], "requires": [ "local_mp_core" ], "sites": { // Damage handler prologue reads the impact's tagged unit reference. // 2.61.0.37: 0x398780; 2.61.0.43: 0x398700. "barrel_damage": { "variants": [ { "written_for": "2.61.0.37", "locate": { "method": "signature", "pattern": "41 56 56 57 53 48 83 ec 58 48 8b 72 ?? 89 f0 83 e0 01 0b 05 ?? ?? ?? ?? 3b 42 ?? 0f 85", "captures": { "unit": { "offset": 12, "type": "u8" } } } } ] }, // The barrel handler sends HUD_MSG_EVENT with hud_gun_barrel_exploded. "barrel_damage_notice": { "variants": [ { "written_for": "2.61.0.37", "locate": { "method": "within", "in": "barrel_damage", "pattern": "b9 09 00 00 00 ba e2 01 00 00 45 31 c0 45 31 c9 e8 ?? ?? ?? ??", "captures": { "id": { "offset": 6, "type": "u32" }, "deliver": { "offset": 17, "type": "rel32" } } } } ] }, // Fire update prologue through the argument saves and the weapon owner's unit load. // 2.61.0.37: 0x13e03a0; 2.61.0.43: 0x13e4a40. "breech_fire_update": { "variants": [ { "written_for": "2.61.0.37", "locate": { "method": "signature", "pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 81 ec f8 01 00 00 44 0f 29 bc 24 e0 01 00 00 44 0f 29 b4 24 d0 01 00 00 44 0f 29 ac 24 c0 01 00 00 44 0f 29 a4 24 b0 01 00 00 44 0f 29 9c 24 a0 01 00 00 44 0f 29 94 24 90 01 00 00 44 0f 29 8c 24 80 01 00 00 44 0f 29 84 24 70 01 00 00 0f 29 bc 24 60 01 00 00 0f 29 b4 24 50 01 00 00 4c 89 8c 24 18 01 00 00 4c 89 84 24 d8 00 00 00 48 89 94 24 10 01 00 00 48 89 ce f3 44 0f 10 94 24 80 02 00 00 48 8b 49 ??", "captures": { "unit": { "offset": 147, "type": "u8" } } } } ] }, // The fire update sends HUD_MSG_EVENT with hud_gun_breech_malfunction_misfire. "breech_damage_notice": { "variants": [ { "written_for": "2.61.0.37", "locate": { "method": "within", "in": "breech_fire_update", "pattern": "b9 09 00 00 00 ba e4 01 00 00 45 31 c0 45 31 c9 e8 ?? ?? ?? ??", "captures": { "id": { "offset": 6, "type": "u32" }, "deliver": { "offset": 17, "type": "rel32" } } } } ] }, // Resolve the currently controlled unit, preferring the active override over the original unit. // 2.61.0.37: 0x598bc0; 2.61.0.43: 0x5994c0. "mplayer_controlled_unit": { "variants": [ { "written_for": "2.61.0.37", "locate": { "method": "signature", "pattern": "48 83 ec 38 48 8d 81 78 08 00 00 48 8d 91 84 08 00 00 44 8b 81 80 08 00 00 4c 8d 89 54 08 00 00 45 85 c0 4c 0f 45 ca 48 8d 91 48 08 00 00" } } ] } } }