1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 14:54:30 +01:00

Port entrance type lookup

This commit is contained in:
Michael Steenbeek
2018-09-26 12:13:44 +02:00
committed by Gymnasiast
parent 757d705e13
commit cc7f8e612d
21 changed files with 62 additions and 55 deletions

View File

@@ -605,9 +605,10 @@ static bool track_design_save_should_select_scenery_around(int32_t rideIndex, rc
return true;
break;
case TILE_ELEMENT_TYPE_ENTRANCE:
if (tileElement->properties.entrance.type != ENTRANCE_TYPE_RIDE_ENTRANCE)
// FIXME: This will always break and return false!
if (tileElement->AsEntrance()->GetEntranceType() != ENTRANCE_TYPE_RIDE_ENTRANCE)
break;
if (tileElement->properties.entrance.type != ENTRANCE_TYPE_RIDE_EXIT)
if (tileElement->AsEntrance()->GetEntranceType() != ENTRANCE_TYPE_RIDE_EXIT)
break;
if (tileElement->properties.entrance.ride_index == rideIndex)
return true;
@@ -926,7 +927,7 @@ static bool track_design_save_to_td6_for_maze(uint8_t rideIndex, rct_track_td6*
{
if (tileElement->GetType() != TILE_ELEMENT_TYPE_ENTRANCE)
continue;
if (tileElement->properties.entrance.type != ENTRANCE_TYPE_RIDE_ENTRANCE)
if (tileElement->AsEntrance()->GetEntranceType() != ENTRANCE_TYPE_RIDE_ENTRANCE)
continue;
if (tileElement->properties.entrance.ride_index == rideIndex)
break;
@@ -956,7 +957,7 @@ static bool track_design_save_to_td6_for_maze(uint8_t rideIndex, rct_track_td6*
{
if (tileElement->GetType() != TILE_ELEMENT_TYPE_ENTRANCE)
continue;
if (tileElement->properties.entrance.type != ENTRANCE_TYPE_RIDE_EXIT)
if (tileElement->AsEntrance()->GetEntranceType() != ENTRANCE_TYPE_RIDE_EXIT)
continue;
if (tileElement->properties.entrance.ride_index == rideIndex)
break;