From 6b2826050bc34865ad31042c88654f7656fe306e Mon Sep 17 00:00:00 2001 From: Christian Schmitt Date: Sun, 25 Mar 2012 23:32:53 +0200 Subject: [PATCH] Make sure the runways are long enough for desired markings. This prevents texture glitches on too short runways where there is simply not enough space for all the needed runway parts. --- src/Airports/GenAirports850/rwy_gen.cxx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Airports/GenAirports850/rwy_gen.cxx b/src/Airports/GenAirports850/rwy_gen.cxx index d5b2b0d3..2ef8f942 100644 --- a/src/Airports/GenAirports850/rwy_gen.cxx +++ b/src/Airports/GenAirports850/rwy_gen.cxx @@ -378,10 +378,19 @@ void Runway::gen_rwy( superpoly_list *rwy_polys, } double length = rwy.length / 2.0; - if ( length < 3075 * SG_FEET_TO_METER ) { - SG_LOG( SG_GENERAL, SG_DEBUG, - "Runway " << rwy.rwnum[0] << " is not long enough (" - << rwy.length << ") for precision markings!"); + + // Make sure our runway is long enough for the desired marking variant + if ( (rwy.marking[rwhalf]==2 || rwy.marking[rwhalf]==4) && length < 1150 * SG_FEET_TO_METER ) { + SG_LOG( SG_GENERAL, SG_ALERT, + "Runway " << rwy.rwnum[rwhalf] << " is not long enough (" + << rwy.length << "m) for non-precision markings! Setting runway markings to visual!"); + rwy.marking[rwhalf]=1; + } + if ( (rwy.marking[rwhalf]==3 || rwy.marking[rwhalf]==5) && length < 3075 * SG_FEET_TO_METER ) { + SG_LOG( SG_GENERAL, SG_ALERT, + "Runway " << rwy.rwnum[rwhalf] << " is not long enough (" + << rwy.length << "m) for precision markings! Setting runway markings to visual!"); + rwy.marking[rwhalf]=1; } double start1_pct = 0.0;