Mercurial > hg > openttd
diff src/station_cmd.cpp @ 6098:bad21330ae92 draft
(svn r8833) -Fix
-Codechange: Split MakeRoadStop() into MakeRoadStop() and MakeDriveThroughRoadStop() for more clarity and less possibilities to use it incorrect
author | tron <tron@openttd.org> |
---|---|
date | Wed, 21 Feb 2007 19:46:37 +0000 |
parents | 1f2c064d8490 |
children | 230764f1a316 |
line wrap: on
line diff
--- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1258,8 +1258,12 @@ st->rect.BeforeAddTile(tile, StationRect::ADD_TRY); - MakeRoadStop(tile, st->owner, st->index, type ? RoadStop::TRUCK : RoadStop::BUS, is_drive_through, (DiagDirection)p1); - if (town_owned_road) SetStopBuiltOnTownRoad(tile); + RoadStop::Type rs_type = type ? RoadStop::TRUCK : RoadStop::BUS; + if (is_drive_through) { + MakeDriveThroughRoadStop(tile, st->owner, st->index, rs_type, (Axis)p1, town_owned_road); + } else { + MakeRoadStop(tile, st->owner, st->index, rs_type, (DiagDirection)p1); + } UpdateStationVirtCoordDirty(st); UpdateStationAcceptance(st, false);