]> git.mxchange.org Git - flightgear.git/commitdiff
proper sound orientation(?) and comment out velocity since it messes with OpenAL...
authorehofman <ehofman>
Sun, 1 Nov 2009 14:53:36 +0000 (14:53 +0000)
committerTim Moore <timoore@redhat.com>
Sun, 1 Nov 2009 21:05:56 +0000 (22:05 +0100)
src/Main/viewmgr.cxx
src/Model/acmodel.cxx

index 5a9b7a20f281a011e15641fe387e145a13961527..60cfdb4377cb20d102a771b2cde179cde101d508 100644 (file)
@@ -304,10 +304,8 @@ FGViewMgr::update (double dt)
   smgr->set_position_offset( offs );
   smgr->set_position_geod( loop_view->getPosition() );
 
-  SGQuatd orient = SGQuatd::fromYawPitchRollDeg( loop_view->getHeading_deg(),
-                                                 loop_view->getPitch_deg(),
-                                                 loop_view->getRoll_deg() );
-  smgr->set_orientation( orient, loop_view->getViewOrientationOffset() );
+  smgr->set_orientation( loop_view->getViewOrientation(),
+                         loop_view->getViewOrientationOffset() );
 
   // get the model velocity
   SGVec3f velocity = SGVec3f::zeros();
index 6d0d32049aeb955e46be14c6a3b1d502598e7a70..3b5ccfb138fa0a041f44fda6395176f91fff32fa 100644 (file)
@@ -126,21 +126,22 @@ FGAircraftModel::update (double dt)
   // update model's audio sample values
   _fx->set_position_geod( _aircraft->getPosition() );
 
-  SGQuatd orient = SGQuatd::fromYawPitchRollDeg(-_heading->getDoubleValue(),
+  SGQuatd orient = SGQuatd::fromYawPitchRollDeg(_heading->getDoubleValue(),
                                                 _pitch->getDoubleValue(),
                                                 _roll->getDoubleValue());
   _fx->set_orientation( orient );
  
+#if 0
   SGVec3d vel = SGVec3d( _speed_n->getFloatValue(),
                          _speed_e->getFloatValue(),
                          _speed_d->getFloatValue() );
   if ( vel[0] || vel[1] || vel[2] ) {
-    SGQuatd hlOr = SGQuatd::fromLonLat( _aircraft->getPosition() );
     SGQuatd q(-0.5, -0.5, 0.5, 0.5);
-    _velocity = toVec3f( (hlOr*q).backTransform( vel ) );
+    _velocity = toVec3f( q.backTransform( vel ) );
   }
   else
       _velocity = SGVec3f::zeros();
+#endif
   _fx->set_velocity( _velocity );
 }