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.
This commit is contained in:
Peter Nelson 2024-04-26 02:38:49 +01:00
parent f44d8fa2e4
commit 6e4ab6f73f
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
1 changed files with 1 additions and 1 deletions

View File

@ -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];
}