C:/Program Files/Git/race command works

This commit is contained in:
Chris Forbes
2009-12-02 21:03:10 +13:00
parent bd5faef639
commit b5b80d4f7f
3 changed files with 28 additions and 4 deletions

View File

@@ -313,6 +313,21 @@ namespace OpenRA.Server
DispatchOrders(null, 0,
new ServerOrder(0, "SetPalette", pal.ToString()).Serialize());
}
if (so.Data.StartsWith("/race "))
{
int race;
if (!int.TryParse(so.Data.Substring(6), out race) || race < 0 || race > 1)
{
Console.WriteLine("Invalid race: {0}",
so.Data.Substring(6));
return;
}
DispatchOrders(null, 0,
new ServerOrder(0, "SetRace", race.ToString()).Serialize());
}
break;
}
}