X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAirports%2Frunways.cxx;h=503f298f401b7850c00486b7a4c4fc246acd82b2;hb=3297ac354430bb6d34247edd76a393dace21c9e4;hp=ed958ea2e213d4bc18899aa7acdc898bb2e8e9b5;hpb=e6859e4fe02071c5ece37da787bd45d4b00ae006;p=flightgear.git diff --git a/src/Airports/runways.cxx b/src/Airports/runways.cxx index ed958ea2e..503f298f4 100644 --- a/src/Airports/runways.cxx +++ b/src/Airports/runways.cxx @@ -54,9 +54,12 @@ operator >> ( istream& in, FGRunway& a ) in >> a.id >> a.rwy_no >> a.lat >> a.lon >> a.heading >> a.length >> a.width >> a.surface_flags >> a.end1_flags >> tmp >> tmp >> a.end2_flags >> tmp >> tmp; + } else if ( a.type == "T" ) { + // in >> a.id >> a.rwy_no >> a.lat >> a.lon >> a.heading + // >> a.length >> a.width >> a.surface_flags; + in >> skipeol; } else { - in >> a.id >> a.rwy_no >> a.lat >> a.lon >> a.heading - >> a.length >> a.width >> a.surface_flags; + in >> skipeol; } return in; @@ -79,7 +82,9 @@ FGRunwayList::FGRunwayList( const string& file ) { FGRunway rwy; while ( in ) { in >> rwy; - runways.insert(pair(rwy.id, rwy)); + if(rwy.type == "R") { + runways.insert(pair(rwy.id, rwy)); + } } } @@ -121,7 +126,7 @@ static string GetReverseRunwayNo(string rwyno) { << rwyno << " passed to GetReverseRunwayNo(...)"); } } - return((string)buf); + return(buf); } @@ -169,7 +174,9 @@ bool FGRunwayList::search( const string& aptid, const string& rwyno, // results if this one matches current = pos; *r = pos->second; - r->rwy_no = revrwyno; + // NOTE - matching revrwyno implies that runwayno was + // actually correct. + r->rwy_no = runwayno; r->heading += 180.0; string tmp = r->end1_flags; r->end1_flags = r->end2_flags;