forked from rosebudai/OpenRCT2-Web
This commit is contained in:
2 files changed
+6
-1
No files matched your search
@@ -2,6 +2,7 @@
|
||||
------------------------------------------------------------------------
|
||||
- Improved: [#26566] Improve the performance of sorting sprites.
|
||||
- Fix: [#26583] The default tab is not highlighted when opening a ride window.
|
||||
- Fix: [#26602] Crash when locating the nearest mechanic for a ride that has not previously been inspected.
|
||||
|
||||
0.5.1 (2026-05-17)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
@@ -1487,8 +1487,12 @@ static void RideCallClosestMechanic(Ride& ride)
|
||||
|
||||
Staff* RideFindClosestMechanic(const Ride& ride, int32_t forInspection)
|
||||
{
|
||||
const auto stationIndex = ride.inspectionStation.IsNull() ? RideGetFirstValidStationExit(ride) : ride.inspectionStation;
|
||||
if (stationIndex.IsNull())
|
||||
return nullptr;
|
||||
|
||||
// Get either exit position or entrance position if there is no exit
|
||||
auto& station = ride.getStation(ride.inspectionStation);
|
||||
const auto& station = ride.getStation(stationIndex);
|
||||
TileCoordsXYZD location = station.Exit;
|
||||
if (location.IsNull())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user