1
0
Fork 0

Fix a bug that would occur on 5GHz computers, and disable the altitude damping feature.

This commit is contained in:
ehofman 2003-07-22 08:51:31 +00:00
parent e47c97844d
commit 9b545fd648

View file

@ -725,6 +725,8 @@ FGViewer::copyLocationData()
void void
FGViewer::dampEyeData (double &alt_ft, double &roll_deg, double &pitch_deg, double &heading_deg) FGViewer::dampEyeData (double &alt_ft, double &roll_deg, double &pitch_deg, double &heading_deg)
{ {
const double interval = 0.01;
static FGViewer *last = 0; static FGViewer *last = 0;
if (last != this) { if (last != this) {
_damp_sync = 0.0; _damp_sync = 0.0;
@ -736,16 +738,20 @@ FGViewer::dampEyeData (double &alt_ft, double &roll_deg, double &pitch_deg, doub
return; return;
} }
if (_damp_sync < 0.01) { if (_damp_sync < interval) {
alt_ft = _damped_alt_ft; if (_damp_alt > 0.0)
roll_deg = _damped_roll_deg; alt_ft = _damped_alt_ft;
pitch_deg = _damped_pitch_deg; if (_damp_roll > 0.0)
heading_deg = _damped_heading_deg; roll_deg = _damped_roll_deg;
if (_damp_pitch > 0.0)
pitch_deg = _damped_pitch_deg;
if (_damp_heading > 0.0)
heading_deg = _damped_heading_deg;
return; return;
} }
while (_damp_sync >= 0.01) { while (_damp_sync >= interval) {
_damp_sync -= 0.01; _damp_sync -= interval;
double d; double d;
if (_damp_alt > 0.0) if (_damp_alt > 0.0)