protected void ConvertFake3DEffect(VirtualMap map, VirtualCell conversion_cell) { CellLocation below_loc = map.GetNeighbourCellLocation(conversion_cell.location, VirtualMap.DirectionType.South); if ((conversion_cell.IsColumn() || conversion_cell.IsWall())) { // If we have a wall below and this is a wall, we transform this to a special wall bool isAbove = false; VirtualCell below_cell = null; if (!map.LocationIsOutsideBounds(below_loc)) { below_cell = map.GetCell(below_loc); if (below_cell.IsColumn() || below_cell.IsWall() || below_cell.IsRock()) { isAbove = true; } else { isAbove = false; } } else { isAbove = true; } if (isAbove) { if (conversion_cell.IsRoom()) { conversion_cell.Type = VirtualCell.CellType.Fake3D_Room_WallAbove; } else { conversion_cell.Type = VirtualCell.CellType.Fake3D_Corridor_WallAbove; } } else { if (conversion_cell.IsRoom()) { conversion_cell.Type = VirtualCell.CellType.Fake3D_Room_WallFront; // // Also, we add this to make sure the doors work correctly // if (below_cell.IsDoor()){ // conversion_cell.AddCellInstance(VirtualCell.CellType.DoorHorizontalTop,below_cell.Orientation); // } } else { conversion_cell.Type = VirtualCell.CellType.Fake3D_Corridor_WallFront; } } conversion_cell.Orientation = VirtualMap.DirectionType.West; // Force orientation } else if (conversion_cell.IsDoor()) { if (conversion_cell.IsHorizontal()) { conversion_cell.Type = VirtualCell.CellType.DoorHorizontalBottom; } else { conversion_cell.Type = VirtualCell.CellType.DoorVertical; } } }