From ca1b5372a0438eeee4fd842ad2d18e6e22cba40e Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Mon, 7 Mar 2022 22:45:57 -0800 Subject: [PATCH] fix multiplayer quest loading --- src/ReceiveCommands.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index d6411590..9f579013 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -777,8 +777,12 @@ void process_menu_selection(shared_ptr s, shared_ptr c, continue; } - send_quest_file(c, bin_basename, *bin_contents, false, false); - send_quest_file(c, dat_basename, *dat_contents, false, false); + // TODO: It looks like blasting all the chunks to the client at once can + // cause GC clients to crash in rare cases. Find a way to slow this down + // (perhaps by only sending each new chunk when they acknowledge the + // previous chunk with a 44 [first chunk] or 13 [later chunks] command). + send_quest_file(l->clients[x], bin_basename, *bin_contents, false, false); + send_quest_file(l->clients[x], dat_basename, *dat_contents, false, false); l->clients[x]->flags |= ClientFlag::Loading; }