From a6d401debfb13fc9998c6555c0e28dc30bd51038 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Fri, 26 Apr 2024 17:47:53 +0100 Subject: [PATCH] Fix: Properly test for presence of waypoint in NewGRF resolver. (#12579) Test whether the BaseStation itself a Station or Waypoint, instead of by the station class ID assigned to it. --- src/newgrf_station.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 1997b10274..a6d0d77f8c 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -504,7 +504,7 @@ uint32_t Waypoint::GetNewGRFVariable(const ResolverObject &, uint8_t variable, [ /* virtual */ const SpriteGroup *StationResolverObject::ResolveReal(const RealSpriteGroup *group) const { - if (this->station_scope.st == nullptr || this->station_scope.statspec->cls_id == STAT_CLASS_WAYP) { + if (this->station_scope.st == nullptr || !Station::IsExpected(this->station_scope.st)) { return group->loading[0]; }