From 373ed3990d59b431c9ed902a832022187279fe44 Mon Sep 17 00:00:00 2001 From: curt Date: Sat, 26 Aug 2000 01:23:58 +0000 Subject: [PATCH] Ironing out bugs ... --- src/Airports/GenAirports/build.cxx | 32 +++++++++++++++++------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/Airports/GenAirports/build.cxx b/src/Airports/GenAirports/build.cxx index 11910af0..d7e5b6b0 100644 --- a/src/Airports/GenAirports/build.cxx +++ b/src/Airports/GenAirports/build.cxx @@ -1405,6 +1405,7 @@ static void gen_non_precision_rwy( const FGRunway& rwy_info, cerr << "Converting to a simple runway ... !" << endl; gen_simple_rwy( rwy_info, "grass_rwy", rwy_polys, texparams, accum ); + return; } double start_pct = 0; @@ -1482,6 +1483,7 @@ static void gen_non_precision_rwy( const FGRunway& rwy_info, start_pct = end_pct; end_pct = start_pct + ( 500 / length ); + if ( end_pct > 1.0 ) { end_pct = 1.0; } gen_runway_section( rwy_info, runway_a, start_pct, end_pct, 0.0, 1.0, @@ -1500,21 +1502,23 @@ static void gen_non_precision_rwy( const FGRunway& rwy_info, // The rest ... // - start_pct = end_pct; - end_pct = 1.0; - gen_runway_section( rwy_info, runway_a, - start_pct, end_pct, - 0.0, 1.0, - rwy_info.heading, - material, "rest", - rwy_polys, texparams, accum ); + if ( end_pct < 1.0 ) { + start_pct = end_pct; + end_pct = 1.0; + gen_runway_section( rwy_info, runway_a, + start_pct, end_pct, + 0.0, 1.0, + rwy_info.heading, + material, "rest", + rwy_polys, texparams, accum ); - gen_runway_section( rwy_info, runway_b, - start_pct, end_pct, - 0.0, 1.0, - rwy_info.heading + 180.0, - material, "rest", - rwy_polys, texparams, accum ); + gen_runway_section( rwy_info, runway_b, + start_pct, end_pct, + 0.0, 1.0, + rwy_info.heading + 180.0, + material, "rest", + rwy_polys, texparams, accum ); + } }