mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-27 08:45:00 +01:00
Refactor checks for station pieces (#11876)
This commit is contained in:
committed by
GitHub
parent
d145b64ab8
commit
f21ddb0723
@@ -611,7 +611,7 @@ static TileElement* find_station_element(const CoordsXYZD& loc, ride_id_t rideIn
|
||||
continue;
|
||||
if (tileElement->AsTrack()->GetRideIndex() != rideIndex)
|
||||
continue;
|
||||
if (!track_element_is_station(tileElement))
|
||||
if (!tileElement->AsTrack()->IsStation())
|
||||
continue;
|
||||
|
||||
return tileElement;
|
||||
@@ -1163,9 +1163,14 @@ int32_t track_get_actual_bank_3(Vehicle* vehicle, TileElement* tileElement)
|
||||
return track_get_actual_bank_2(ride->type, isInverted, bankStart);
|
||||
}
|
||||
|
||||
bool track_element_is_station(TileElement* trackElement)
|
||||
bool TrackElement::IsStation() const
|
||||
{
|
||||
switch (trackElement->AsTrack()->GetTrackType())
|
||||
return track_type_is_station(GetTrackType());
|
||||
}
|
||||
|
||||
bool track_type_is_station(track_type_t trackType)
|
||||
{
|
||||
switch (trackType)
|
||||
{
|
||||
case TRACK_ELEM_END_STATION:
|
||||
case TRACK_ELEM_BEGIN_STATION:
|
||||
|
||||
Reference in New Issue
Block a user