crude map change support; quite a few things aren't right

This commit is contained in:
Chris Forbes
2009-12-22 21:49:04 +13:00
parent ff90bd7b21
commit f57865bd32
7 changed files with 81 additions and 35 deletions

View File

@@ -301,6 +301,29 @@ namespace OpenRA.Server
new ServerOrder(conn.PlayerIndex, "SetPalette", pal.ToString()).Serialize());
return true;
}},
{ "map",
s =>
{
if (conn.PlayerIndex != 0)
{
DispatchOrdersToClient(conn, 0,
new ServerOrder( conn.PlayerIndex, "Chat",
"Only the host can change the map" ).Serialize() );
return true;
}
if (conn.IsReady)
{
DispatchOrdersToClient(conn, 0,
new ServerOrder( conn.PlayerIndex, "Chat",
"You can't change the map after the game has started" ).Serialize() );
return true;
}
DispatchOrders( null, 0,
new ServerOrder(0, "ChangeMap", s).Serialize());
return true;
}},
};
var cmdName = cmd.Split(' ').First();