From d51f7a0fe7bae69a84739e45f196d153548e5c31 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sun, 5 Jan 2025 10:43:58 -0800 Subject: [PATCH] fix v2/v3 crossplay quest loading --- src/SendCommands.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/SendCommands.cc b/src/SendCommands.cc index e7534dce..dc4be521 100644 --- a/src/SendCommands.cc +++ b/src/SendCommands.cc @@ -3967,10 +3967,12 @@ bool send_quest_barrier_if_all_clients_ready(shared_ptr l) { return false; } - send_command(l, 0xAC, 0x00); - for (x = 0; x < l->max_clients; x++) { - if (l->clients[x]) { - l->clients[x]->disconnect_hooks.erase(QUEST_BARRIER_DISCONNECT_HOOK_NAME); + for (auto& lc : l->clients) { + if (lc) { + if (!is_v1_or_v2(lc->version())) { + send_command(lc, 0xAC, 0x00); + } + lc->disconnect_hooks.erase(QUEST_BARRIER_DISCONNECT_HOOK_NAME); } } return true;