layout tidyup - start game now forces game start, ready checkboxes behave as before.

This commit is contained in:
alzeih
2010-07-25 22:16:21 +12:00
parent 26b5fbe9bb
commit 5f357288ee
5 changed files with 59 additions and 50 deletions

View File

@@ -240,23 +240,24 @@ namespace OpenRA.Server
conn.socket.RemoteEndPoint, client.State);
SyncLobbyInfo();
if (conns.Count > 0 && conns.All(c => GetClient(c).State == Session.ClientState.Ready))
InterpretCommand(conn, "startgame");
return true;
}},
{ "startgame",
s =>
{
if (conns.Count > 0 && conns.All(c => GetClient(c).State == Session.ClientState.Ready))
{
GameStarted = true;
foreach( var c in conns )
foreach( var d in conns )
DispatchOrdersToClient( c, d.PlayerIndex, 0x7FFFFFFF, new byte[] { 0xBF } );
GameStarted = true;
foreach( var c in conns )
foreach( var d in conns )
DispatchOrdersToClient( c, d.PlayerIndex, 0x7FFFFFFF, new byte[] { 0xBF } );
DispatchOrders(null, 0,
new ServerOrder("StartGame", "").Serialize());
DispatchOrders(null, 0,
new ServerOrder("StartGame", "").Serialize());
PingMasterServer();
}
PingMasterServer();
return true;
}},
{ "name",