A bunch of fixes to syncing clients who join mid-round:

- syncing items spawned/removed mid-round
- syncing characters spawned mid-round (through the console or by respawning)
- making sure that item IDs of the spawned characters match
- syncing wall damage
This commit is contained in:
Regalis
2016-07-25 18:48:48 +03:00
parent 6c79a8c568
commit 357a853342
10 changed files with 494 additions and 133 deletions
@@ -385,6 +385,31 @@ namespace Barotrauma.Networking
"Votes (y/n): " + EndVoteCount + "/" + (EndVoteMax - EndVoteCount), Color.White, null, 0, GUI.SmallFont);
}
}
if (respawnManager != null)
{
string respawnInfo = "";
if (respawnManager.CurrentState == RespawnManager.State.Waiting &&
respawnManager.CountdownStarted &&
myCharacter != null && myCharacter.IsDead)
{
respawnInfo = respawnManager.RespawnTimer <= 0.0f ? "" : "Respawning in " + ToolBox.SecondsToReadableTime(respawnManager.RespawnTimer);
}
else if (respawnManager.CurrentState == RespawnManager.State.Transporting)
{
respawnInfo = respawnManager.TransportTimer <= 0.0f ? "" : "Shuttle leaving in " + ToolBox.SecondsToReadableTime(respawnManager.TransportTimer);
}
if (!string.IsNullOrEmpty(respawnInfo))
{
GUI.DrawString(spriteBatch,
new Vector2(GameMain.GraphicsWidth - 300.0f, 20),
respawnInfo, Color.White, null, 0, GUI.SmallFont);
}
}
}
public virtual bool SelectCrewCharacter(GUIComponent component, object obj)