mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
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.
This commit is contained in:
parent
a60a81f34e
commit
a6d401debf
@ -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];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user