Whoops, work-around for #926 correctly.
Hyde confirmed this fixes the issue, leaving the code present but disabled for the moment.
This commit is contained in:
parent
ab1c0e946f
commit
88847ab02e
1 changed files with 5 additions and 4 deletions
|
@ -158,16 +158,13 @@ static PositionedID readNavFromStream(std::istream& aStream,
|
||||||
|
|
||||||
if ((type >= FGPositioned::OM) && (type <= FGPositioned::IM)) {
|
if ((type >= FGPositioned::OM) && (type <= FGPositioned::IM)) {
|
||||||
AirportRunwayPair arp(cache->findAirportRunway(name));
|
AirportRunwayPair arp(cache->findAirportRunway(name));
|
||||||
#if 0
|
|
||||||
// code is disabled since it's causing some problems, see
|
|
||||||
// http://code.google.com/p/flightgear-bugs/issues/detail?id=926
|
|
||||||
if (arp.second && (elev_ft < 0.01)) {
|
if (arp.second && (elev_ft < 0.01)) {
|
||||||
// snap to runway elevation
|
// snap to runway elevation
|
||||||
FGPositioned* runway = cache->loadById(arp.second);
|
FGPositioned* runway = cache->loadById(arp.second);
|
||||||
assert(runway);
|
assert(runway);
|
||||||
pos.setElevationFt(runway->geod().getElevationFt());
|
pos.setElevationFt(runway->geod().getElevationFt());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return cache->insertNavaid(type, string(), name, pos, 0, 0, 0,
|
return cache->insertNavaid(type, string(), name, pos, 0, 0, 0,
|
||||||
arp.first, arp.second);
|
arp.first, arp.second);
|
||||||
}
|
}
|
||||||
|
@ -186,10 +183,14 @@ static PositionedID readNavFromStream(std::istream& aStream,
|
||||||
if (arp.second) {
|
if (arp.second) {
|
||||||
runway = static_cast<FGRunway*>(cache->loadById(arp.second));
|
runway = static_cast<FGRunway*>(cache->loadById(arp.second));
|
||||||
assert(runway);
|
assert(runway);
|
||||||
|
#if 0
|
||||||
|
// code is disabled since it's causing some problems, see
|
||||||
|
// http://code.google.com/p/flightgear-bugs/issues/detail?id=926
|
||||||
if (elev_ft < 0.01) {
|
if (elev_ft < 0.01) {
|
||||||
// snap to runway elevation
|
// snap to runway elevation
|
||||||
pos.setElevationFt(runway->geod().getElevationFt());
|
pos.setElevationFt(runway->geod().getElevationFt());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} // of found runway in the DB
|
} // of found runway in the DB
|
||||||
} // of type is runway-related
|
} // of type is runway-related
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue