Fix #14356, ff7eb996e6: Incorrect sprite group chosen for stations and road stops. (#14359)

This commit is contained in:
Peter Nelson
2025-06-14 13:38:45 +01:00
committed by GitHub
parent 8e3acbfa84
commit 1cd0391926
2 changed files with 4 additions and 16 deletions

View File

@@ -227,7 +227,6 @@ RoadStopResolverObject::RoadStopResolverObject(const RoadStopSpec *roadstopspec,
if (st == nullptr) {
/* No station, so we are in a purchase list */
ctype = CargoGRFFileProps::SG_PURCHASE;
this->root_spritegroup = roadstopspec->grf_prop.GetSpriteGroup(ctype);
} else if (Station::IsExpected(st)) {
const Station *station = Station::From(st);
/* Pick the first cargo that we have waiting */
@@ -238,16 +237,12 @@ RoadStopResolverObject::RoadStopResolverObject(const RoadStopSpec *roadstopspec,
break;
}
}
if (this->root_spritegroup == nullptr) {
ctype = CargoGRFFileProps::SG_DEFAULT_NA;
this->root_spritegroup = roadstopspec->grf_prop.GetSpriteGroup(ctype);
}
}
this->root_spritegroup = this->roadstop_scope.roadstopspec->grf_prop.GetSpriteGroup(ctype);
if (this->root_spritegroup == nullptr) {
ctype = CargoGRFFileProps::SG_DEFAULT;
this->root_spritegroup = roadstopspec->grf_prop.GetSpriteGroup(ctype);
this->root_spritegroup = this->roadstop_scope.roadstopspec->grf_prop.GetSpriteGroup(ctype);
}
/* Remember the cargo type we've picked */