1
0
Fork 0

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.
This commit is contained in:
Christian Schmitt 2012-03-25 23:32:53 +02:00
parent 59d30a34e8
commit 6b2826050b

View file

@ -378,10 +378,19 @@ void Runway::gen_rwy( superpoly_list *rwy_polys,
} }
double length = rwy.length / 2.0; double length = rwy.length / 2.0;
if ( length < 3075 * SG_FEET_TO_METER ) {
SG_LOG( SG_GENERAL, SG_DEBUG, // Make sure our runway is long enough for the desired marking variant
"Runway " << rwy.rwnum[0] << " is not long enough (" if ( (rwy.marking[rwhalf]==2 || rwy.marking[rwhalf]==4) && length < 1150 * SG_FEET_TO_METER ) {
<< rwy.length << ") for precision markings!"); 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; double start1_pct = 0.0;