private void FlattenTerrain(Scene[,] regions, double height) { for (int x = 0; x < regions.GetUpperBound(0) * Constants.RegionSize; x++) { for (int y = 0; y < regions.GetUpperBound(1) * Constants.RegionSize; y++) { regions[x / Constants.RegionSize, y / Constants.RegionSize].Heightmap[x % (int)Constants.RegionSize, y % (int)Constants.RegionSize] = height; } } UpdateTaintedRegions(); }