From c63248ee516d9e36ea493fb00419b4bc9faa62b2 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Wed, 26 Jul 2017 18:46:29 +0300 Subject: [PATCH] DockingPort syncing fix: the server didn't take into account that the IDs of the hulls created between docking ports may change during loading if another sub has an entity with the same ID. The clients would still use the old ID, which lead to syncing issues such as client-side fires inside docking ports (for example in HSE Kullervo Carrier). --- .../Source/Items/Components/DockingPort.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Barotrauma/BarotraumaShared/Source/Items/Components/DockingPort.cs b/Barotrauma/BarotraumaShared/Source/Items/Components/DockingPort.cs index ff7ff5f5f..1aae8cf23 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Components/DockingPort.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Components/DockingPort.cs @@ -717,12 +717,12 @@ namespace Barotrauma.Items.Components { msg.Write(dockingTarget.item.ID); - if (hullIds[0] != null && hullIds[1] != null && gapId != null) + if (hulls[0] != null && hulls[1] != null && gap != null) { msg.Write(true); - msg.Write((ushort)hullIds[0]); - msg.Write((ushort)hullIds[1]); - msg.Write((ushort)gapId); + msg.Write(hulls[0].ID); + msg.Write(hulls[1].ID); + msg.Write(gap.ID); } else {