summaryrefslogtreecommitdiff
path: root/vehicle.c
diff options
context:
space:
mode:
Diffstat (limited to 'vehicle.c')
-rw-r--r--vehicle.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/vehicle.c b/vehicle.c
index e2d19b081..7ba098751 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -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)