diff --git a/Subsurface/Source/Networking/EntitySpawner.cs b/Subsurface/Source/Networking/EntitySpawner.cs index 84d82fbf2..ff8b29da0 100644 --- a/Subsurface/Source/Networking/EntitySpawner.cs +++ b/Subsurface/Source/Networking/EntitySpawner.cs @@ -214,7 +214,7 @@ namespace Barotrauma ushort entityId = message.ReadUInt16(); var entity = Entity.FindEntityByID(entityId); - if (entity == null || NetIdUtils.IdMoreRecent(NetStateID,(UInt16)(ID - entityCount + i))) continue; //already removed + if (entity == null || NetIdUtils.IdMoreRecent((UInt16)(NetStateID - 1), (UInt16)(ID - entityCount + i))) continue; //already removed entity.Remove(); } diff --git a/Subsurface/Source/Networking/GameClient.cs b/Subsurface/Source/Networking/GameClient.cs index cb0047c32..07ed46c29 100644 --- a/Subsurface/Source/Networking/GameClient.cs +++ b/Subsurface/Source/Networking/GameClient.cs @@ -123,6 +123,7 @@ namespace Barotrauma.Networking } myCharacter = Character.Controlled; + ChatMessage.LastID = 0; // Create new instance of configs. Parameter is "application Id". It has to be same on client and server. NetPeerConfiguration config = new NetPeerConfiguration("barotrauma");