added protocol versioning. AssignPlayer order is dead.

This commit is contained in:
Chris Forbes
2010-01-25 18:29:56 +13:00
parent 0998e1f17b
commit be8bb20e82
7 changed files with 35 additions and 23 deletions

View File

@@ -77,7 +77,8 @@ namespace OpenRA.Server
// assign the player number.
newConn.PlayerIndex = ChooseFreePlayerIndex();
newConn.socket.Send( BitConverter.GetBytes( newConn.PlayerIndex ) );
newConn.socket.Send(BitConverter.GetBytes(ProtocolVersion.Version));
newConn.socket.Send(BitConverter.GetBytes(newConn.PlayerIndex));
conns.Add(newConn);
lobbyInfo.Clients.Add(
@@ -90,9 +91,6 @@ namespace OpenRA.Server
State = Session.ClientState.NotReady
});
DispatchOrdersToClient(newConn, 0, 0,
new ServerOrder(newConn.PlayerIndex, "AssignPlayer", "").Serialize());
Console.WriteLine("Accepted connection from {0}.",
newConn.socket.RemoteEndPoint);