James Turner :
If someone could kindly apply the attached patch, that'll keep this from crashing, I believe. The fix is easy since FGAirport can now always provide an active runway - there's no need to guess at random, or rely on the tower having set one up.
This commit is contained in:
parent
4f071a9207
commit
2b0588d170
1 changed files with 1 additions and 10 deletions
|
@ -165,18 +165,9 @@ void FGAILocalTraffic::GetAirportDetails(const string& id) {
|
|||
void FGAILocalTraffic::GetRwyDetails(const string& id) {
|
||||
//cout << "GetRwyDetails called" << endl;
|
||||
|
||||
if(_controlled) {
|
||||
rwy.rwyID = tower->GetActiveRunway();
|
||||
} else {
|
||||
// TODO - get a proper runway ID from uncontrolled airports
|
||||
rwy.rwyID = "00";
|
||||
}
|
||||
|
||||
// Now we need to get the threshold position and rwy heading
|
||||
|
||||
const FGAirport* apt = fgFindAirportID(id);
|
||||
assert(apt);
|
||||
FGRunway runway(apt->getRunwayByIdent(rwy.rwyID));
|
||||
FGRunway runway(apt->getActiveRunwayForUsage());
|
||||
|
||||
double hdg = runway._heading;
|
||||
double other_way = hdg - 180.0;
|
||||
|
|
Loading…
Add table
Reference in a new issue