Turn off runway lights during the day, except in less than 5km
visibility (that should be lower, but it will do for now).
This commit is contained in:
parent
52312f2a13
commit
c5ebb65efd
1 changed files with 3 additions and 5 deletions
|
@ -74,17 +74,15 @@ typedef int_list::const_iterator int_point_list_iterator;
|
||||||
static double normals[FG_MAX_NODES][3];
|
static double normals[FG_MAX_NODES][3];
|
||||||
static double tex_coords[FG_MAX_NODES*3][3];
|
static double tex_coords[FG_MAX_NODES*3][3];
|
||||||
|
|
||||||
#if 0
|
|
||||||
// not used because plib branches don't honor call backs.
|
// not used because plib branches don't honor call backs.
|
||||||
static int
|
static int
|
||||||
runway_lights_predraw (ssgEntity * e)
|
runway_lights_pretrav (ssgEntity * e, int mask)
|
||||||
{
|
{
|
||||||
// Turn on lights only at night
|
// Turn on lights only at night
|
||||||
float sun_angle = cur_light_params.sun_angle * SGD_RADIANS_TO_DEGREES;
|
float sun_angle = cur_light_params.sun_angle * SGD_RADIANS_TO_DEGREES;
|
||||||
return int((sun_angle > 90.0) ||
|
return int((sun_angle > 90.0) ||
|
||||||
(fgGetDouble("/environment/visibility-m") < 5000.0));
|
(fgGetDouble("/environment/visibility-m") < 5000.0));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define FG_TEX_CONSTANT 69.0
|
#define FG_TEX_CONSTANT 69.0
|
||||||
|
@ -1411,8 +1409,8 @@ bool fgBinObjLoad( const string& path, const bool is_base,
|
||||||
up );
|
up );
|
||||||
// branches don't honor callbacks as far as I know so I'm
|
// branches don't honor callbacks as far as I know so I'm
|
||||||
// commenting this out to avoid a plib runtime warning.
|
// commenting this out to avoid a plib runtime warning.
|
||||||
// branch->setCallback( SSG_CALLBACK_PREDRAW,
|
branch->setTravCallback( SSG_CALLBACK_PRETRAV,
|
||||||
// runway_lights_predraw );
|
runway_lights_pretrav );
|
||||||
if ( pt_materials[i].substr(0, 16) == "RWY_BLUE_TAXIWAY" ) {
|
if ( pt_materials[i].substr(0, 16) == "RWY_BLUE_TAXIWAY" ) {
|
||||||
taxi_lights->addKid( branch );
|
taxi_lights->addKid( branch );
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue