Check result sprite group of RoadStopResolverObject in DrawTile_Station

This commit is contained in:
Jonathan G Rennison
2023-01-30 00:10:52 +00:00
parent 68cf9b02ec
commit 5e37f86d09

View File

@@ -3547,10 +3547,12 @@ draw_default_foundation:
st = BaseStation::GetByTile(ti->tile);
RoadStopResolverObject object(stopspec, st, ti->tile, INVALID_ROADTYPE, type, view);
const SpriteGroup *group = object.Resolve();
const DrawTileSprites *dts = ((const TileLayoutSpriteGroup *)group)->ProcessRegisters(nullptr);
t = dts;
if (type == STATION_ROADWAYPOINT && (stopspec->draw_mode & ROADSTOP_DRAW_MODE_WAYP_GROUND)) {
draw_ground = true;
if (group != nullptr && group->type == SGT_TILELAYOUT) {
const DrawTileSprites *dts = ((const TileLayoutSpriteGroup *)group)->ProcessRegisters(nullptr);
t = dts;
if (type == STATION_ROADWAYPOINT && (stopspec->draw_mode & ROADSTOP_DRAW_MODE_WAYP_GROUND)) {
draw_ground = true;
}
}
}