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 | d31506654cd28005f062c003cc36bbfd5ffd8fea (patch) | |
tree | cdc3bd7ad1c9ab34d178db2060a5dc0f89fbe4e2 /src/train_cmd.cpp | |
parent | 6685c7c8e2ccebc0593bcf74d7efd8c601f1e17d (diff) | |
download | openttd-d31506654cd28005f062c003cc36bbfd5ffd8fea.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: |