diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index f14095cf50..832f75eade 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -3340,15 +3340,13 @@ draw_default_foundation: const RoadTypeInfo *tram_rti = tram_rt == INVALID_ROADTYPE ? nullptr : GetRoadTypeInfo(tram_rt); Axis axis = GetRoadStopDir(ti->tile) == DIAGDIR_NE ? AXIS_X : AXIS_Y; - DiagDirection dir = GetRoadStopDir(ti->tile); + StationGfx view = GetStationGfx(ti->tile); StationType type = GetStationType(ti->tile); const RoadStopSpec *stopspec = GetRoadStopSpec(ti->tile); RoadStopDrawMode stop_draw_mode{}; if (stopspec != nullptr) { stop_draw_mode = stopspec->draw_mode; - int view = dir; - if (IsDriveThroughStopTile(ti->tile)) view += 4; st = BaseStation::GetByTile(ti->tile); RoadStopResolverObject object(stopspec, st, ti->tile, INVALID_ROADTYPE, type, view); const SpriteGroup *group = object.Resolve(); @@ -3385,7 +3383,7 @@ draw_default_foundation: if ((stopspec == nullptr || (stop_draw_mode & ROADSTOP_DRAW_MODE_ROAD) != 0) && road_rti->UsesOverlay()) { SpriteID ground = GetCustomRoadSprite(road_rti, ti->tile, ROTSG_ROADSTOP); - DrawGroundSprite(ground + dir, PAL_NONE); + DrawGroundSprite(ground + view, PAL_NONE); } } diff --git a/src/table/newgrf_debug_data.h b/src/table/newgrf_debug_data.h index dd10846489..6f4f9eb486 100644 --- a/src/table/newgrf_debug_data.h +++ b/src/table/newgrf_debug_data.h @@ -704,8 +704,7 @@ class NIHRoadStop : public NIHelper { uint Resolve(uint index, uint var, uint32_t param, bool &avail) const override { - int view = GetRoadStopDir(index); - if (IsDriveThroughStopTile(index)) view += 4; + StationGfx view = GetStationGfx(index); RoadStopResolverObject ro(GetRoadStopSpec(index), BaseStation::GetByTile(index), index, INVALID_ROADTYPE, GetStationType(index), view); return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, avail); }