Changeset - r14824:bc3b6521d11a
[Not reviewed]
master
0 1 0
michi_cc - 14 years ago 2010-03-14 20:57:23
michi_cc@openttd.org
(svn r19425) -Fix: [YAPP] A train on a bridge/tunnel was not always found when checking for trains on a reserved path.
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/pbs.cpp
Show inline comments
 
@@ -287,6 +287,11 @@ PBSTileInfo FollowTrainReservation(const
 
				if (ftoti.best != NULL) *train_on_res = ftoti.best->First();
 
			}
 
		}
 
		if (*train_on_res == NULL && IsTileType(ftoti.res.tile, MP_TUNNELBRIDGE)) {
 
			/* The target tile is a bridge/tunnel, also check the other end tile. */
 
			FindVehicleOnPos(GetOtherTunnelBridgeEnd(ftoti.res.tile), &ftoti, FindTrainOnTrackEnum);
 
			if (ftoti.best != NULL) *train_on_res = ftoti.best->First();
 
		}
 
	}
 
	return ftoti.res;
 
}
0 comments (0 inline, 0 general)