| 1595 | } |
| 1596 | |
| 1597 | EntranceElement* MapGetRideExitElementAt(const CoordsXYZ& exitCoords, bool ghost) |
| 1598 | { |
| 1599 | auto exitTileCoords = TileCoordsXYZ{ exitCoords }; |
| 1600 | TileElement* tileElement = MapGetFirstElementAt(exitCoords); |
| 1601 | if (tileElement != nullptr) |
| 1602 | { |
| 1603 | do |
| 1604 | { |
| 1605 | if (tileElement->getType() != TileElementType::Entrance) |
| 1606 | continue; |
| 1607 | |
| 1608 | if (tileElement->baseHeight != exitTileCoords.z) |
| 1609 | continue; |
| 1610 | |
| 1611 | if (tileElement->asEntrance()->GetEntranceType() != ENTRANCE_TYPE_RIDE_EXIT) |
| 1612 | continue; |
| 1613 | |
| 1614 | if (!ghost && tileElement->isGhost()) |
| 1615 | continue; |
| 1616 | |
| 1617 | return tileElement->asEntrance(); |
| 1618 | } while (!(tileElement++)->isLastForTile()); |
| 1619 | } |
| 1620 | return nullptr; |
| 1621 | } |
| 1622 | |
| 1623 | SmallSceneryElement* MapGetSmallSceneryElementAt(const CoordsXYZ& sceneryCoords, int32_t type, uint8_t quadrant) |
| 1624 | { |