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,12 +3547,14 @@ draw_default_foundation:
st = BaseStation::GetByTile(ti->tile); st = BaseStation::GetByTile(ti->tile);
RoadStopResolverObject object(stopspec, st, ti->tile, INVALID_ROADTYPE, type, view); RoadStopResolverObject object(stopspec, st, ti->tile, INVALID_ROADTYPE, type, view);
const SpriteGroup *group = object.Resolve(); const SpriteGroup *group = object.Resolve();
if (group != nullptr && group->type == SGT_TILELAYOUT) {
const DrawTileSprites *dts = ((const TileLayoutSpriteGroup *)group)->ProcessRegisters(nullptr); const DrawTileSprites *dts = ((const TileLayoutSpriteGroup *)group)->ProcessRegisters(nullptr);
t = dts; t = dts;
if (type == STATION_ROADWAYPOINT && (stopspec->draw_mode & ROADSTOP_DRAW_MODE_WAYP_GROUND)) { if (type == STATION_ROADWAYPOINT && (stopspec->draw_mode & ROADSTOP_DRAW_MODE_WAYP_GROUND)) {
draw_ground = true; draw_ground = true;
} }
} }
}
/* Draw ground sprite */ /* Draw ground sprite */
if (draw_ground) { if (draw_ground) {