fix 6x0A definition

This commit is contained in:
Martin Michelsen
2024-01-15 14:56:24 -08:00
parent c15e154846
commit 9311483932
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -3836,7 +3836,7 @@ template <bool IsBigEndian>
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<IsBigEndian, be_uint32_t, le_uint32_t>::type flags = 0;
} __packed__;
+1 -1
View File
@@ -2455,7 +2455,7 @@ static void on_enemy_hit(shared_ptr<Client> 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)) {