public WritableMapFileCell(ChnkCell cell) { X = cell.X; Y = cell.Y; if (cell.WorldAreaIds.Any(a => a != 0u)) { Array.Copy(cell.WorldAreaIds, worldAreaIds, 4); flags |= Flags.Area; } }
public WritableMapFileCell(ChnkCell cell) { X = cell.X; Y = cell.Y; if ((cell.Flags & ChnkCellFlags.Zone) != 0) { Array.Copy(cell.WorldZoneIds, worldZoneIds, 4); flags |= Flags.Zone; } if ((cell.Flags & ChnkCellFlags.HeightMap) != 0) { for (int y = 0; y < 17; y++) { for (int x = 0; x < 17; x++) { heightMap[x, y] = (cell.Heightmap[x + 1, y + 1] / 8.0f) - 2048f; } } flags |= Flags.Height; } if ((cell.Flags & ChnkCellFlags.ZoneBound) != 0) { for (int y = 0; y < 64; y++) { for (int x = 0; x < 64; x++) { worldZoneBounds[x, y] = cell.WorldZoneBounds[x, y]; } } flags |= Flags.ZoneBound; } }
public WritableMapFileCell(ChnkCell cell) { X = cell.X; Y = cell.Y; if ((cell.Flags & ChnkCellFlags.Area) != 0) { Array.Copy(cell.WorldAreaIds, worldAreaIds, 4); flags |= Flags.Area; } if ((cell.Flags & ChnkCellFlags.HeightMap) != 0) { for (int y = 0; y < 17; y++) { for (int x = 0; x < 17; x++) { heightMap[x, y] = (cell.Heightmap[x + 1, y + 1] / 8.0f) - 2048f; } } flags |= Flags.Height; } }