From a9bf0cdd4e4db7165ac6a7ad1d394a6da8e2d35d Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 3 Jun 2016 22:03:22 +0100 Subject: [PATCH] fix #3811: Multiplayer Crash on join Game was probably being updated with title sequence sprite spatial index. --- src/rct2/S6Importer.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/rct2/S6Importer.cpp b/src/rct2/S6Importer.cpp index 25c21d3a25..8d6a5a9ec8 100644 --- a/src/rct2/S6Importer.cpp +++ b/src/rct2/S6Importer.cpp @@ -16,6 +16,7 @@ #include "../core/Exception.hpp" #include "../core/IStream.hpp" +#include "../network/network.h" #include "S6Importer.h" extern "C" @@ -378,7 +379,15 @@ void S6Importer::Import() } reset_loaded_objects(); map_update_tile_pointers(); - game_do_command(0, GAME_COMMAND_FLAG_APPLY, 0, 0, GAME_COMMAND_RESET_SPRITES, 0, 0); + if (network_get_mode() == NETWORK_MODE_CLIENT) + { + reset_sprite_spatial_index(); + game_do_command(0, GAME_COMMAND_FLAG_APPLY, 0, 0, GAME_COMMAND_RESET_SPRITES, 0, 0); + } + else + { + reset_sprite_spatial_index(); + } game_convert_strings_to_utf8(); if (FixIssues) {