diff options
author | tron <tron@openttd.org> | 2007-02-21 19:46:37 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2007-02-21 19:46:37 +0000 |
commit | f716c0b30ffb5db1ad81a9015f03cb07fb4c9351 (patch) | |
tree | 327b9afd9d4879eddc62a6cecd008a805989849d /src/station_cmd.cpp | |
parent | 45b662c679e0f443883e2408b9db4614e95fc3e4 (diff) | |
download | openttd-f716c0b30ffb5db1ad81a9015f03cb07fb4c9351.tar.xz |
(svn r8833) -Fix
-Codechange: Split MakeRoadStop() into MakeRoadStop() and MakeDriveThroughRoadStop() for more clarity and less possibilities to use it incorrect
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index eb11ed5cb..9cb8a9fac 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1258,8 +1258,12 @@ int32 CmdBuildRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) 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); |