added palette changing

This commit is contained in:
Chris Forbes
2009-12-02 20:07:19 +13:00
parent 6d9455fc49
commit 7e064fec1a
2 changed files with 24 additions and 0 deletions

View File

@@ -299,6 +299,20 @@ namespace OpenRA.Server
DispatchOrders(null, 0,
new ServerOrder(0, "SetLag", lag.ToString()).Serialize());
}
if (so.Data.StartsWith("/pal "))
{
int pal;
if (!int.TryParse(so.Data.Substring(5), out pal) || pal < 0 || pal > 7)
{
Console.WriteLine("Invalid palette: {0}",
so.Data.Substring(5));
return;
}
DispatchOrders(null, 0,
new ServerOrder(0, "SetPalette", pal.ToString()).Serialize());
}
break;
}
}