From 84c62b33a4a1e678e4314d4ca08df8c47cad4215 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sat, 1 Mar 2025 19:30:44 -0800 Subject: [PATCH] update comments on 6x93 and 6xB2 --- src/CommandFormats.hh | 8 ++++---- src/ReceiveSubcommands.cc | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CommandFormats.hh b/src/CommandFormats.hh index 1526bfb9..e5e5ef2a 100644 --- a/src/CommandFormats.hh +++ b/src/CommandFormats.hh @@ -5415,15 +5415,15 @@ struct G_Unknown_6x92 { le_float unknown_a2 = 0.0f; } __packed_ws__(G_Unknown_6x92, 0x0C); -// 6x93: Activate timed switch (not valid on Episode 3) +// 6x93: Set switch flag from timer (not valid on Episode 3) -struct G_ActivateTimedSwitch_6x93 { +struct G_SetSwitchFlagFromTimer_6x93 { G_UnusedHeader header; le_uint16_t switch_flag_floor = 0; le_uint16_t switch_flag_num = 0; uint8_t should_set = 0; // The switch flag is only set if this is equal to 1; otherwise it's cleared parray unused; -} __packed_ws__(G_ActivateTimedSwitch_6x93, 0x0C); +} __packed_ws__(G_SetSwitchFlagFromTimer_6x93, 0x0C); // 6x94: Warp (not valid on Episode 3) @@ -5727,7 +5727,7 @@ struct G_MoveLobbyChair_6xB0 { struct G_PlaySoundFromPlayer_6xB2 { G_UnusedHeader header; - uint8_t floor = 0; + uint8_t area = 0; // Not floor! uint8_t unused = 0; le_uint16_t client_id = 0; le_uint32_t sound_id = 0; // 0x00051720 = camera shutter sound diff --git a/src/ReceiveSubcommands.cc b/src/ReceiveSubcommands.cc index bcaa8ce3..a43780bf 100644 --- a/src/ReceiveSubcommands.cc +++ b/src/ReceiveSubcommands.cc @@ -1777,7 +1777,7 @@ static void on_play_sound_from_player(shared_ptr c, uint8_t command, uin const auto& cmd = check_size_t(data, size); // This command can be used to play arbitrary sounds, but the client only // ever sends it for the camera shutter sound, so we only allow that one. - if (cmd.floor == c->floor && cmd.sound_id == 0x00051720) { + if (cmd.sound_id == 0x00051720) { forward_subcommand(c, command, flag, data, size); } } @@ -3483,7 +3483,7 @@ static void on_update_attackable_col_state(shared_ptr c, uint8_t command } static void on_activate_timed_switch(shared_ptr c, uint8_t command, uint8_t flag, void* data, size_t size) { - const auto& cmd = check_size_t(data, size); + const auto& cmd = check_size_t(data, size); auto l = c->require_lobby(); if (!l->is_game()) { return;