forked from mirror/OpenTTD
(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
This commit is contained in:
@@ -1049,13 +1049,6 @@ static uint32 VehicleEnter_Road(Vehicle *v, TileIndex tile, int x, int y)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void VehicleLeave_Road(Vehicle *v, TileIndex tile, int x, int y)
|
||||
{
|
||||
if (IsLevelCrossing(tile) && v->type == VEH_Train && v->next == NULL) {
|
||||
UnbarCrossing(tile);
|
||||
MarkTileDirtyByTile(tile);
|
||||
}
|
||||
}
|
||||
|
||||
static void ChangeTileOwner_Road(TileIndex tile, PlayerID old_player, PlayerID new_player)
|
||||
{
|
||||
@@ -1103,6 +1096,5 @@ const TileTypeProcs _tile_type_road_procs = {
|
||||
ChangeTileOwner_Road, /* change_tile_owner_clear */
|
||||
NULL, /* get_produced_cargo_proc */
|
||||
VehicleEnter_Road, /* vehicle_enter_tile_proc */
|
||||
VehicleLeave_Road, /* vehicle_leave_tile_proc */
|
||||
GetSlopeTileh_Road, /* get_slope_tileh_proc */
|
||||
};
|
||||
|
Reference in New Issue
Block a user