- server asks the clients whether they're ready to start a round, giving some time to load the selected sub before the round starts

- fixed joining clients not being informed about vote status or voting being enabled
This commit is contained in:
Regalis
2016-05-24 19:10:11 +03:00
parent 4f4c59eba3
commit 52f28f98a7
4 changed files with 61 additions and 10 deletions

View File

@@ -487,6 +487,17 @@ namespace Barotrauma.Networking
switch (packetType)
{
case (byte)PacketTypes.CanStartGame:
string subName = inc.ReadString();
string subHash = inc.ReadString();
if (GameMain.NetLobbyScreen.TrySelectSub(subName,subHash))
{
NetOutgoingMessage readyToStartMsg = client.CreateMessage();
readyToStartMsg.Write((byte)PacketTypes.StartGame);
client.SendMessage(readyToStartMsg, NetDeliveryMethod.ReliableUnordered);
}
break;
case (byte)PacketTypes.StartGame:
if (Screen.Selected == GameMain.GameScreen) continue;