1
0
Fork 0

Speculative fix for bug 1149, AI traffic on helipads.

Avoid helipads when doing runway choice fallback.
http://code.google.com/p/flightgear-bugs/issues/detail?id=1149
This commit is contained in:
James Turner 2013-06-30 16:48:14 +01:00
parent 1924bdfd82
commit 05572cbb3e

View file

@ -251,6 +251,12 @@ FGRunwayRef FGAirport::findBestRunwayForHeading(double aHeading) const
BOOST_FOREACH(PositionedID id, mRunways) {
FGRunway* rwy = loadById<FGRunway>(id);
// bug http://code.google.com/p/flightgear-bugs/issues/detail?id=1149
// (and probably some other issues besides).
if (rwy->type() == FGPositioned::HELIPAD) {
continue;
}
double good = rwy->score(lengthWeight, widthWeight, surfaceWeight);
double dev = aHeading - rwy->headingDeg();
SG_NORMALIZE_RANGE(dev, -180.0, 180.0);