From 70fc620ebee6363430ed4fa1c077bfd04e6cd09f Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Thu, 11 Apr 2019 22:51:08 +0200 Subject: [PATCH] Fix #9083: Wrong sign index is set for clients This issue was caused by the ghost for banners, which already create an entry on the banner. The game command is then received while the ghost still exists, giving the placed banner another ID. This fix is basically a copy of the fix that is also `game_do_command_p` that tackles this same issue. --- src/openrct2/network/Network.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/openrct2/network/Network.cpp b/src/openrct2/network/Network.cpp index 32a355c775..94e737183d 100644 --- a/src/openrct2/network/Network.cpp +++ b/src/openrct2/network/Network.cpp @@ -1976,6 +1976,17 @@ void Network::ProcessGameCommands() if (gc.action != nullptr) { + // Remove ghost scenery so it doesn't interfere with incoming network command + switch (gc.action->GetType()) + { + case GAME_COMMAND_PLACE_WALL: + case GAME_COMMAND_PLACE_LARGE_SCENERY: + case GAME_COMMAND_PLACE_BANNER: + case GAME_COMMAND_PLACE_SCENERY: + scenery_remove_ghost_tool_placement(); + break; + } + GameAction* action = gc.action.get(); action->SetFlags(action->GetFlags() | GAME_COMMAND_FLAG_NETWORKED);