From 931148393289653d0e259e0278d0059f7bdfac45 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Mon, 15 Jan 2024 14:56:24 -0800 Subject: [PATCH] fix 6x0A definition --- src/CommandFormats.hh | 2 +- src/ReceiveSubcommands.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CommandFormats.hh b/src/CommandFormats.hh index 7a3b9cf2..2d47a1e8 100644 --- a/src/CommandFormats.hh +++ b/src/CommandFormats.hh @@ -3836,7 +3836,7 @@ template struct G_EnemyHitByPlayer_6x0A { G_EnemyIDHeader header; le_uint16_t enemy_index = 0; // [0, 0xB50) - le_uint16_t remaining_hp = 0; + le_uint16_t total_damage = 0; typename std::conditional::type flags = 0; } __packed__; diff --git a/src/ReceiveSubcommands.cc b/src/ReceiveSubcommands.cc index 5170c012..50959b2f 100644 --- a/src/ReceiveSubcommands.cc +++ b/src/ReceiveSubcommands.cc @@ -2455,7 +2455,7 @@ static void on_enemy_hit(shared_ptr c, uint8_t command, uint8_t, void* d enemy.last_hit_by_client_id = c->lobby_client_id; } - G_EnemyHitByPlayer_GC_6x0A sw_cmd = {{{cmd.header.subcommand, cmd.header.size, cmd.header.enemy_id}, cmd.enemy_index, cmd.remaining_hp, cmd.flags.load()}}; + G_EnemyHitByPlayer_GC_6x0A sw_cmd = {{{cmd.header.subcommand, cmd.header.size, cmd.header.enemy_id}, cmd.enemy_index, cmd.total_damage, cmd.flags.load()}}; bool sender_is_gc = is_big_endian(c->version()); for (auto lc : l->clients) { if (lc && (lc != c)) {