policy on race/palette changes

This commit is contained in:
Chris Forbes
2009-12-22 21:24:31 +13:00
parent ea51366f0d
commit ff90bd7b21

View File

@@ -260,6 +260,14 @@ namespace OpenRA.Server
{ "race",
s =>
{
if (conn.IsReady)
{
DispatchOrdersToClient(conn, 0,
new ServerOrder( conn.PlayerIndex, "Chat",
"You can't change your race after the game has started" ).Serialize() );
return true;
}
int race;
if (!int.TryParse(s, out race) || race < 0 || race > 1)
{
@@ -274,6 +282,14 @@ namespace OpenRA.Server
{ "pal",
s =>
{
if (conn.IsReady)
{
DispatchOrdersToClient(conn, 0,
new ServerOrder( conn.PlayerIndex, "Chat",
"You can't change your color after the game has started" ).Serialize() );
return true;
}
int pal;
if (!int.TryParse(s, out pal) || pal < 0 || pal > 7)
{