Panel night lighting acts as if lights are always turned on. We don't
really see anything different in the day, but as day turns to night the panel smoothly darkens and the lighting component becomes visible. Lights are wired to electrical system so if you kill power, you lose the lights.
This commit is contained in:
parent
8685e68b99
commit
c7df5f3639
2 changed files with 15 additions and 10 deletions
|
@ -373,12 +373,14 @@ FGPanel::draw()
|
|||
glEnable(GL_BLEND);
|
||||
glEnable(GL_ALPHA_TEST);
|
||||
glEnable(GL_COLOR_MATERIAL);
|
||||
// glColor4f(1.0, 1.0, 1.0, 1.0);
|
||||
if ( cur_light_params.sun_angle * SGD_RADIANS_TO_DEGREES < 95.0 ) {
|
||||
glColor4fv( cur_light_params.scene_diffuse );
|
||||
} else {
|
||||
glColor4f(0.7, 0.2, 0.2, 1.0);
|
||||
sgVec4 panel_color;
|
||||
sgCopyVec4( panel_color, cur_light_params.scene_diffuse );
|
||||
if ( fgGetDouble("/systems/electrical/outputs/instrument-lights") > 1.0 ) {
|
||||
if ( panel_color[0] < 0.7 ) panel_color[0] = 0.7;
|
||||
if ( panel_color[1] < 0.2 ) panel_color[1] = 0.2;
|
||||
if ( panel_color[2] < 0.2 ) panel_color[2] = 0.2;
|
||||
}
|
||||
glColor4fv( panel_color );
|
||||
if (_bg != 0) {
|
||||
glBindTexture(GL_TEXTURE_2D, _bg->getHandle());
|
||||
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||
|
@ -877,12 +879,14 @@ FGTexturedLayer::draw ()
|
|||
|
||||
// From Curt: turn on the panel
|
||||
// lights after sundown.
|
||||
if ( cur_light_params.sun_angle * SGD_RADIANS_TO_DEGREES < 95.0 ) {
|
||||
glColor4fv( cur_light_params.scene_diffuse );
|
||||
} else {
|
||||
glColor4f(0.7, 0.2, 0.2, 1.0);
|
||||
sgVec4 panel_color;
|
||||
sgCopyVec4( panel_color, cur_light_params.scene_diffuse );
|
||||
if ( fgGetDouble("/systems/electrical/outputs/instrument-lights") > 1.0 ) {
|
||||
if ( panel_color[0] < 0.7 ) panel_color[0] = 0.7;
|
||||
if ( panel_color[1] < 0.2 ) panel_color[1] = 0.2;
|
||||
if ( panel_color[2] < 0.2 ) panel_color[2] = 0.2;
|
||||
}
|
||||
|
||||
glColor4fv( panel_color );
|
||||
|
||||
glTexCoord2f(_texture.getMinX(), _texture.getMinY()); glVertex2f(-w2, -h2);
|
||||
glTexCoord2f(_texture.getMaxX(), _texture.getMinY()); glVertex2f(w2, -h2);
|
||||
|
|
|
@ -318,6 +318,7 @@ void FGSteam::_CatchUp()
|
|||
More subtle flaw is having it not move or a travel limit
|
||||
occasionally due to some dirt in the tube or on the ball.
|
||||
*/
|
||||
// cout << current_aircraft.fdm_state->get_A_Z_pilot() << endl;
|
||||
d = -current_aircraft.fdm_state->get_A_Z_pilot();
|
||||
if ( d < 1 ) d = 1;
|
||||
set_lowpass ( & the_TC_rad,
|
||||
|
|
Loading…
Add table
Reference in a new issue