1
0
Fork 0

Vassilii Khachaturov:

Fix the current buggy rain orientation behaviour for the views attached to the
aircraft (while still inheriting bugs with the views attached to anything else).
This commit is contained in:
ehofman 2006-02-02 09:57:33 +00:00
parent 8141bfe2da
commit c695e7c788

View file

@ -710,14 +710,20 @@ FGRenderer::update( bool refresh_camera_settings ) {
glDepthMask( GL_TRUE );
}
}
double current_view_origin_airspeed_horiz_kt =
fgGetDouble("/velocities/airspeed-kt", 0.0)
* cos( fgGetDouble("/orientation/pitch-deg", 0.0)
* SGD_DEGREES_TO_RADIANS);
// TODO:find the real view speed, not the AC one
sgEnviro.drawPrecipitation(
fgGetDouble("/environment/metar/rain-norm", 0.0),
fgGetDouble("/environment/metar/snow-norm", 0.0),
fgGetDouble("/environment/metar/hail-norm", 0.0),
current__view->getPitch_deg() - current__view->getPitchOffset_deg(),
current__view->getPitch_deg() + current__view->getPitchOffset_deg(),
current__view->getRoll_deg() + current__view->getRollOffset_deg(),
- current__view->getHeadingOffset_deg(),
fgGetDouble("/velocities/airspeed-kt", 0.0));
current_view_origin_airspeed_horiz_kt
);
// compute shadows and project them on screen
bool is_internal = globals->get_current_view()->getInternal();