added protocol versioning. AssignPlayer order is dead.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user