]> git.mxchange.org Git - flightgear.git/commitdiff
Fix #220, Ctrl-U no longer working for YASim
authorTorsten Dreyer <Torsten@t3r.de>
Tue, 5 Jul 2011 15:33:11 +0000 (17:33 +0200)
committerTorsten Dreyer <Torsten@t3r.de>
Tue, 5 Jul 2011 15:33:11 +0000 (17:33 +0200)
Set model-state's position from properties so it can be manipulated
from the property tree.

src/FDM/YASim/YASim.cxx

index 9635e7294ce6cba9d80c3dfa068d65834fec482f..95261df5597b4c95973fbf43d535bf0770af0285 100644 (file)
@@ -259,6 +259,11 @@ void YASim::copyToYASim(bool copyState)
 
     // position
     sgGeodToCart(lat, lon, alt, s.pos);
+    {
+      // allow setting of /position/[lat|long|alti]tude
+      double * dp = &model->getState()->pos[0];
+      dp[0] = s.pos[0]; dp[1] = s.pos[1]; dp[2] = s.pos[2];
+    }
 
     // orientation
     Glue::euler2orient(roll, pitch, hdg, s.orient);