Fix a late joining client not knowing if the lobby has been paused (#1199)

* Fix client not knowing that the lobby is paused when joining after the pause

Also fixes a client thinking that a lobby is paused when joining a new one after leaving a previously paused one

* Add server announcement to delaying and pausing round start
This commit is contained in:
DrSmugleaf
2020-06-23 21:30:37 +02:00
committed by GitHub
parent 7089b60738
commit 78085855db
3 changed files with 11 additions and 0 deletions

View File

@@ -66,6 +66,7 @@ namespace Content.Shared
public bool YouAreReady { get; set; }
// UTC.
public DateTime StartTime { get; set; }
public bool Paused { get; set; }
public override void ReadFromBuffer(NetIncomingMessage buffer)
{
@@ -78,6 +79,7 @@ namespace Content.Shared
YouAreReady = buffer.ReadBoolean();
StartTime = new DateTime(buffer.ReadInt64(), DateTimeKind.Utc);
Paused = buffer.ReadBoolean();
}
public override void WriteToBuffer(NetOutgoingMessage buffer)
@@ -91,6 +93,7 @@ namespace Content.Shared
buffer.Write(YouAreReady);
buffer.Write(StartTime.Ticks);
buffer.Write(Paused);
}
}