(49d6e0ff6) Fixed an ID mismatch problem that occasionally caused clients to get kicked out in the multiplayer campaign. Closes #1603, closes #1562

This commit is contained in:
Joonas Rikkonen
2019-06-13 11:46:03 +03:00
parent cdb2476d51
commit 40aac0de8f
3 changed files with 84 additions and 6 deletions
@@ -382,7 +382,6 @@ namespace Barotrauma
DockedTo = new List<Submarine>();
ID = ushort.MaxValue;
FreeID();
}
@@ -1405,7 +1404,7 @@ namespace Barotrauma
}
ID = (ushort)(ushort.MaxValue - Submarine.loaded.IndexOf(this));
ID = (ushort)(ushort.MaxValue - 1 - Submarine.loaded.IndexOf(this));
}
public static Submarine Load(XElement element, bool unloadPrevious)