From 6e4ab6f73fe34ca53430ebe186946df23158d4f8 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Fri, 26 Apr 2024 02:38:49 +0100 Subject: [PATCH] Fix: Properly test for presence of waypoint in NewGRF resolver. 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]; }