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 /train_cmd.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 'train_cmd.c')
-rw-r--r-- | train_cmd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/train_cmd.c b/train_cmd.c index 0567cee0d..8d9378848 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -2931,6 +2931,11 @@ static void TrainController(Vehicle *v) goto invalid_rail; } + if (IsLevelCrossingTile(v->tile) && v->next == NULL) { + UnbarCrossing(v->tile); + MarkTileDirtyByTile(v->tile); + } + if (IsFrontEngine(v)) v->load_unload_time_rem = 0; if (!(r&0x4)) { |