diff options
author | rubidium <rubidium@openttd.org> | 2009-12-04 20:52:19 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-12-04 20:52:19 +0000 |
commit | fac2f8ce1ad9b527bbfdd1b80b727282a1e84e73 (patch) | |
tree | 534ac167cbfaa6800571d6acd6c58f5782439507 /src/station_cmd.cpp | |
parent | 65b3e38beab6454ec67eae26f30db548a84d437d (diff) | |
download | openttd-fac2f8ce1ad9b527bbfdd1b80b727282a1e84e73.tar.xz |
(svn r18404) -Codechange: link drive through stops better together
-Feature: make penalty for road stop occupancy user configurable
-Fix [FS#1944]: road vehicles would not pick an empty drive through stop. Now they will *if* the penalty for driving around is less than the occupancy penalty
-Fix [FS#1495]: long (articulated) road vehicles could block loading of others when the following road vehicle already got 'permission' to go to the next bay even when it could not reach it
-Change: improve the throughput of the drive through road stops by letting them stop closer together
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 9a9c4825f..1cc549ce5 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1638,6 +1638,7 @@ CommandCost CmdBuildRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uin RoadStopType rs_type = type ? ROADSTOP_TRUCK : ROADSTOP_BUS; if (is_drive_through) { MakeDriveThroughRoadStop(tile, st->owner, road_owner, tram_owner, st->index, rs_type, rts, (Axis)p1); + road_stop->MakeDriveThrough(); } else { MakeRoadStop(tile, st->owner, st->index, rs_type, rts, (DiagDirection)p1); } @@ -1721,6 +1722,13 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags) pred->next = cur_stop->next; } + if (IsDriveThroughStopTile(tile)) { + /* Clears the tile for us */ + cur_stop->ClearDriveThrough(); + } else { + DoClearSquare(tile); + } + SetWindowWidgetDirty(WC_STATION_VIEW, st->index, SVW_ROADVEHS); delete cur_stop; @@ -1733,7 +1741,6 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags) } } - DoClearSquare(tile); st->rect.AfterRemoveTile(st, tile); st->UpdateVirtCoord(); |