Fix an incorrect coordinate check.

This commit is contained in:
Paul Chote
2015-06-25 17:24:42 +01:00
parent 26ce7b5e1c
commit e10cb5cd9c

View File

@@ -664,7 +664,7 @@ namespace OpenRA
// (b) Therefore: // (b) Therefore:
// - ax + by adds (a - b) * 512 + 512 to u // - ax + by adds (a - b) * 512 + 512 to u
// - ax + by adds (a + b) * 512 + 512 to v // - ax + by adds (a + b) * 512 + 512 to v
var z = Contains(cell) ? 512 * MapHeight.Value[cell] : 0; var z = MapHeight.Value.Contains(cell) ? 512 * MapHeight.Value[cell] : 0;
return new WPos(512 * (cell.X - cell.Y), 512 * (cell.X + cell.Y + 1), z); return new WPos(512 * (cell.X - cell.Y), 512 * (cell.X + cell.Y + 1), z);
} }