Fix #14356, ff7eb996e6: Incorrect sprite group chosen for stations and road stops. (#14359)
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user