mirror of https://github.com/OpenRCT2/OpenRCT2.git
Check station flags instead of hardcoded legacy IDs
PR #20483 introduced a check for covered stations, but incorrectly checked the RCT2 IDs. This commit replaces this check with a proper flag check, which will work for any station style, including custom ones.
This commit is contained in:
parent
ba585f4474
commit
adadaafdb0
|
@ -158,12 +158,8 @@ bool Balloon::Collides() const
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// all station platforms besides the plain and invisible ones are covered
|
auto* ride = GetRide(trackElement->GetRideIndex());
|
||||||
auto style = GetRide(trackElement->GetRideIndex())->GetEntranceStyle();
|
check_ceiling = (ride != nullptr) ? RideHasStationShelter(*ride) : false;
|
||||||
if (style != RCT12_STATION_STYLE_PLAIN && style != RCT12_STATION_STYLE_INVISIBLE)
|
|
||||||
{
|
|
||||||
check_ceiling = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5983,15 +5983,3 @@ ResultWithMessage Ride::ChangeStatusCreateVehicles(bool isApplying, const Coords
|
||||||
|
|
||||||
return { true };
|
return { true };
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t Ride::GetEntranceStyle() const
|
|
||||||
{
|
|
||||||
if (const auto* stationObject = GetStationObject(); stationObject != nullptr)
|
|
||||||
{
|
|
||||||
return GetStationStyleFromIdentifier(stationObject->GetIdentifier());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return RCT12_STATION_STYLE_PLAIN;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue