diff --git a/Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs b/Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs index fb9abb67a..82de3230d 100644 --- a/Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs +++ b/Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs @@ -1282,75 +1282,6 @@ namespace Barotrauma.Networking } } - private void ReadLobbyUpdate(NetIncomingMessage inc) - { - UInt16 listId = inc.ReadUInt16(); - List tempClients = new List(); - int clientCount = inc.ReadByte(); - for (int i = 0; i < clientCount; i++) - { - byte id = inc.ReadByte(); - string name = inc.ReadString(); - UInt16 characterID = inc.ReadUInt16(); - bool muted = inc.ReadBoolean(); - inc.ReadPadBits(); - - tempClients.Add(new TempClient - { - ID = id, - Name = name, - CharacterID = characterID, - Muted = muted - }); - } - - if (NetIdUtils.IdMoreRecent(listId, LastClientListUpdateID)) - { - bool updateClientListId = true; - List currentClients = new List(); - foreach (TempClient tc in tempClients) - { - //see if the client already exists - var existingClient = ConnectedClients.Find(c => c.ID == tc.ID && c.Name == tc.Name); - if (existingClient == null) //if not, create it - { - existingClient = new Client(tc.Name, tc.ID) - { - Muted = tc.Muted - }; - ConnectedClients.Add(existingClient); - GameMain.NetLobbyScreen.AddPlayer(existingClient); - } - existingClient.Character = null; - existingClient.Muted = tc.Muted; - if (tc.CharacterID > 0) - { - existingClient.Character = Entity.FindEntityByID(tc.CharacterID) as Character; - if (existingClient.Character == null) - { - updateClientListId = false; - } - } - if (existingClient.ID == myID) - { - existingClient.SetPermissions(permissions, permittedConsoleCommands); - } - currentClients.Add(existingClient); - } - //remove clients that aren't present anymore - for (int i = ConnectedClients.Count - 1; i >= 0; i--) - { - if (!currentClients.Contains(ConnectedClients[i])) - { - GameMain.NetLobbyScreen.RemovePlayer(ConnectedClients[i]); - ConnectedClients[i].Dispose(); - ConnectedClients.RemoveAt(i); - } - } - if (updateClientListId) LastClientListUpdateID = listId; - } - } - private void ReadLobbyUpdate(NetIncomingMessage inc) { ServerNetObject objHeader; diff --git a/Barotrauma/BarotraumaShared/Submarines/Dugong.sub b/Barotrauma/BarotraumaShared/Submarines/Dugong.sub index bfcc4904b..5b887ece3 100644 Binary files a/Barotrauma/BarotraumaShared/Submarines/Dugong.sub and b/Barotrauma/BarotraumaShared/Submarines/Dugong.sub differ diff --git a/Barotrauma/BarotraumaShared/Submarines/Humpback.sub b/Barotrauma/BarotraumaShared/Submarines/Humpback.sub index 0e37eeee6..50d1e74b4 100644 Binary files a/Barotrauma/BarotraumaShared/Submarines/Humpback.sub and b/Barotrauma/BarotraumaShared/Submarines/Humpback.sub differ