Merge pull request #3311 from chrisforbes/placebuilding-resolve

validate building placement in ResolveOrder as well
This commit is contained in:
Curtis Shmyr
2013-05-17 21:14:53 -07:00
2 changed files with 8 additions and 1 deletions

View File

@@ -62,7 +62,8 @@ namespace OpenRA.Mods.RA
}
else
{
if (!self.World.CanPlaceBuilding(order.TargetString, buildingInfo, order.TargetLocation, null))
if (!self.World.CanPlaceBuilding(order.TargetString, buildingInfo, order.TargetLocation, null)
|| !buildingInfo.IsCloseEnoughToBase(self.World, order.Player, order.TargetString, order.TargetLocation))
{
return;
}

View File

@@ -91,6 +91,12 @@ namespace OpenRA.Mods.RA.Server
{ "startgame",
s =>
{
if (!client.IsAdmin)
{
server.SendOrderTo(conn, "Message", "Only the host can start the game");
return true;
}
if (server.lobbyInfo.Slots.Any(sl => sl.Value.Required &&
server.lobbyInfo.ClientInSlot(sl.Key) == null))
{