diff options
author | tron <tron@openttd.org> | 2006-04-25 07:32:33 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-04-25 07:32:33 +0000 |
commit | 18ad0ae50ee5cc57c571677de1a4e458d2d9de08 (patch) | |
tree | c52854038a7463251f059ce8699ab9ab6a257684 /vehicle.c | |
parent | 288f4eed6577de01c9dafeee3dd2e803030da9fb (diff) | |
download | openttd-18ad0ae50ee5cc57c571677de1a4e458d2d9de08.tar.xz |
(svn r4572) Remove vehicle_leave_tile_proc
There's exactly one implemented function (unbarring a level crossing) and one place where it can be triggered (a train leaves a level crossing)
It's a bit overkill, so just handle this one case where it can happen
Diffstat (limited to 'vehicle.c')
-rw-r--r-- | vehicle.c | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -2012,18 +2012,7 @@ Trackdir GetVehicleTrackdir(const Vehicle* v) * other bits that can be set? */ uint32 VehicleEnterTile(Vehicle *v, TileIndex tile, int x, int y) { - TileIndex old_tile = v->tile; - uint32 result = _tile_type_procs[GetTileType(tile)]->vehicle_enter_tile_proc(v, tile, x, y); - - /* When vehicle_enter_tile_proc returns 8, that apparently means that - * we cannot enter the tile at all. In that case, don't call - * leave_tile. */ - if (!(result & 8) && old_tile != tile) { - VehicleLeaveTileProc *proc = _tile_type_procs[GetTileType(old_tile)]->vehicle_leave_tile_proc; - if (proc != NULL) - proc(v, old_tile, x, y); - } - return result; + return _tile_type_procs[GetTileType(tile)]->vehicle_enter_tile_proc(v, tile, x, y); } UnitID GetFreeUnitNumber(byte type) |