Input syncing between clients, inventory sync bugfix, structure sync bugfix, settings button highlight bugfix, spectating bugfixes, in-game chatbox not visible when joining a server when the round is running

This commit is contained in:
Regalis
2015-11-14 00:09:56 +02:00
parent 24ed95cd68
commit ab7c39071c
15 changed files with 105 additions and 101 deletions

View File

@@ -248,7 +248,7 @@ namespace Barotrauma.Networking
if (gameStarted && disconnectedClients[i].Character!=null)
{
disconnectedClients[i].Character.Remove();
disconnectedClients[i].Character.Kill(CauseOfDeath.Damage, true);
disconnectedClients[i].Character = null;
}
@@ -609,7 +609,7 @@ namespace Barotrauma.Networking
{
if (NetworkEvent.Events.Count == 0) return;
List<Client> recipients = ConnectedClients.FindAll(c => c.Character != null);
List<Client> recipients = ConnectedClients.FindAll(c => c.Character != null || c.Spectating);
if (recipients.Count == 0) return;
@@ -784,6 +784,7 @@ namespace Barotrauma.Networking
var messageBox = new GUIMessageBox("The round has ended", endMessage, 400, 300);
Character.Controlled = null;
myCharacter = null;
GameMain.GameScreen.Cam.TargetPos = Vector2.Zero;
GameMain.LightManager.LosEnabled = false;