(svn r18647) -Fix: [YAPP] A train inside a station was not always found when checking for trains on a reserved path.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user