diff options
author | michi_cc <michi_cc@openttd.org> | 2009-12-27 14:37:50 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2009-12-27 14:37:50 +0000 |
commit | f7025612e1bfb10619a216a92960b701ede1b643 (patch) | |
tree | 50390c4078e56b3cd5dce3afd6b0f9c855be532f /src/train_cmd.cpp | |
parent | 182b0b5c141da2afb1d686c08ea786b28d3e0689 (diff) | |
download | openttd-f7025612e1bfb10619a216a92960b701ede1b643.tar.xz |
(svn r18647) -Fix: [YAPP] A train inside a station was not always found when checking for trains on a reserved path.
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r-- | src/train_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 5fbd2278f..d2c64bc0a 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -2872,14 +2872,14 @@ bool TryPathReserve(Train *v, bool mark_as_stuck, bool first_tile_okay) } } - bool other_train = false; + Vehicle *other_train = NULL; PBSTileInfo origin = FollowTrainReservation(v, &other_train); /* The path we are driving on is alread blocked by some other train. * This can only happen in certain situations when mixing path and * block signals or when changing tracks and/or signals. * Exit here as doing any further reservations will probably just * make matters worse. */ - if (other_train && v->tile != origin.tile) { + if (other_train != NULL && other_train->index != v->index) { if (mark_as_stuck) MarkTrainAsStuck(v); return false; } |