public void PlaceSector(SectorTemplate sector, int x, int y) { for (int j = 0; j < sector.Height; ++j) { for (int i = 0; i < sector.Width; ++i) { var index = (y + j) * Width + x + i; pillars[index] = (short)sector.GetPillar(i, j); byte f = 0; if (sector.IsPassable(i, j)) f |= FlagPassable; flags[index] = f; } } }
public void PlaceSector(SectorTemplate sector, int x, int y) { for (int j = 0; j < sector.Height; ++j) { for (int i = 0; i < sector.Width; ++i) { var index = (y + j) * Width + x + i; pillars[index] = (short)sector.GetPillar(i, j); byte f = 0; if (sector.IsPassable(i, j)) { f |= FlagPassable; } flags[index] = f; } } }