From f7025612e1bfb10619a216a92960b701ede1b643 Mon Sep 17 00:00:00 2001 From: michi_cc Date: Sun, 27 Dec 2009 14:37:50 +0000 Subject: (svn r18647) -Fix: [YAPP] A train inside a station was not always found when checking for trains on a reserved path. --- src/train_cmd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/train_cmd.cpp') 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; } -- cgit v1.2.3-54-g00ecf