clipped voronoi regions for ground control; buildings cannot be placed outside of ground control anymore

This commit is contained in:
Chris Forbes
2009-10-23 20:10:28 +13:00
parent d60775f45c
commit 7d6e254983
7 changed files with 131 additions and 19 deletions

View File

@@ -27,6 +27,9 @@ namespace OpenRa
public int Length { get { return (int)Math.Sqrt(LengthSquared); } }
public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); }
public static int2 Max(int2 a, int2 b) { return new int2(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y)); }
public static int2 Min(int2 a, int2 b) { return new int2(Math.Min(a.X, b.X), Math.Min(a.Y, b.Y)); }
public override bool Equals(object obj)
{
if (obj == null)