diff options
author | smatz <smatz@openttd.org> | 2007-12-14 23:21:20 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2007-12-14 23:21:20 +0000 |
commit | 4b7f8f04a300c99fb82280851651ffdae4706d61 (patch) | |
tree | cdc3bd7ad1c9ab34d178db2060a5dc0f89fbe4e2 /src/train_cmd.cpp | |
parent | dedb15786c1caac8f57a3dc48d1c56b2dec0c92e (diff) | |
download | openttd-4b7f8f04a300c99fb82280851651ffdae4706d61.tar.xz |
(svn r11633) -Codechange: merge CheckTunnelEmpty and IsVehicleOnBridge into GetVehicleTunnelBridge
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r-- | src/train_cmd.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 6b71962a1..401e9ab49 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -3026,8 +3026,6 @@ reverse_train_direction: ReverseTrainDirection(v); } -extern TileIndex CheckTunnelBusy(TileIndex tile, uint *length); - /** * Deletes/Clears the last wagon of a crashed train. It takes the engine of the * train, then goes to the last wagon and deletes that. Each call to this function @@ -3062,9 +3060,9 @@ static void DeleteLastWagon(Vehicle *v) DisableTrainCrossing(v->tile); if ((v->u.rail.track == TRACK_BIT_WORMHOLE && v->vehstatus & VS_HIDDEN)) { // inside a tunnel - TileIndex endtile = CheckTunnelBusy(v->tile, NULL); + TileIndex endtile = GetOtherTunnelEnd(v->tile); - if (endtile == INVALID_TILE) return; // tunnel is busy (error returned) + if (GetVehicleTunnelBridge(v->tile, endtile) != NULL) return; // tunnel is busy (error returned) switch (v->direction) { case 1: |