/// <summary> /// Adds the a z level of a map. /// </summary> /// <param name="pos">The floor's center position.</param> /// <param name="width">Floor weight to add.</param> /// <param name="height">Floor height to add.</param> /// <param name="offset">Floor offset relative to the player.</param> /// <param name="map">A reference to the map.</param> /// <param name="player">The player for whom the map information is sent.</param> private void AddFloorInfo(Position pos, int width, int height, short offset, Map map, Player player) { for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { Tile tile = map.GetTile(x + pos.x + offset, y + pos.y + offset, pos.z); potentialAddTiles.Add(tile); if (tile != null) { foreach (Tile potentialTile in potentialAddTiles) { AddMapTile(potentialTile, player); } potentialAddTiles.Clear(); } } } }