Possible to use the same sub as the main submarine and the respawn shuttle, fixed duplicate client names in netlobby if reconnecting before the server has disconnected the client, fixed "end round" button not appearing when joining mid-round

This commit is contained in:
Regalis
2016-08-14 20:13:40 +03:00
parent 3f804acd42
commit 7e14ca6186
3 changed files with 10 additions and 22 deletions

View File

@@ -386,6 +386,10 @@ namespace Barotrauma.Networking
public override void Update(float deltaTime)
{
#if DEBUG
if (PlayerInput.GetKeyboardState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.P)) return;
#endif
base.Update(deltaTime);
if (!connected) return;
@@ -736,22 +740,6 @@ namespace Barotrauma.Networking
crew.Add(newCharacter);
}
//int count = inc.ReadByte();
//for (int n = 0; n < count; n++)
//{
// byte id = inc.ReadByte();
// Character newCharacter = ReadCharacterData(inc, id == myID);
// if (id != myID)
// {
// var characterOwner = otherClients.Find(c => c.ID == id);
// if (characterOwner != null) characterOwner.Character = newCharacter;
// }
// crew.Add(newCharacter);
// yield return CoroutineStatus.Running;
//}
}
gameStarted = true;
@@ -1107,11 +1095,6 @@ namespace Barotrauma.Networking
character.ID = ID;
//WayPoint spawnPoint = Entity.FindEntityByID(spawnPointID) as WayPoint;
//if (spawnPoint != null)
//{
// //character.GiveJobItems(spawnPoint);
//}
Item.Spawner.ReadNetworkData(inc);
@@ -1120,6 +1103,8 @@ namespace Barotrauma.Networking
myCharacter = character;
Character.Controlled = character;
GameMain.LightManager.LosEnabled = true;
if (endRoundButton != null) endRoundButton.Visible = Voting.AllowEndVoting;
}
return character;