Move ClampToWorld from WorldUtils to Map

This commit is contained in:
Pavlos Touboulidis
2014-06-13 13:59:40 +03:00
parent c282fa1077
commit 77fb188585
6 changed files with 11 additions and 11 deletions

View File

@@ -88,12 +88,6 @@ namespace OpenRA
public const int MaxRange = 50;
static List<CVec>[] TilesByDistance = InitTilesByDistance(MaxRange);
public static CPos ClampToWorld(this World world, CPos xy)
{
var r = world.Map.Bounds;
return xy.Clamp(new Rectangle(r.X,r.Y,r.Width-1, r.Height-1));
}
public static CPos ChooseRandomEdgeCell(this World w)
{
var isX = w.SharedRandom.Next(2) == 0;