[pkg-fgfs-crew] [flightgear] 01/03: Import upstream version 2.12.1

Markus Wanner markus_wanner-guest at moszumanska.debian.org
Tue Jan 21 21:35:05 UTC 2014


This is an automated email from the git hooks/post-receive script.

markus_wanner-guest pushed a commit to branch master
in repository flightgear.

commit a50db1e2ebcde8c77b7b06ce1e54308657d7da5c
Author: Markus Wanner <markus at bluegap.ch>
Date:   Tue Jan 21 22:27:00 2014 +0100

    Import upstream version 2.12.1
---
 src/Autopilot/route_mgr.cxx            | 4 ++++
 src/Instrumentation/HUD/HUD_ladder.cxx | 4 ++--
 src/Main/bootstrap.cxx                 | 7 +++++++
 src/Navaids/NavDataCache.cxx           | 4 ++++
 src/Scripting/NasalPositioned.cxx      | 6 +++++-
 src/Scripting/NasalSys.cxx             | 8 +++++---
 version                                | 2 +-
 7 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/src/Autopilot/route_mgr.cxx b/src/Autopilot/route_mgr.cxx
index 71dddb3..fd46f4b 100644
--- a/src/Autopilot/route_mgr.cxx
+++ b/src/Autopilot/route_mgr.cxx
@@ -234,6 +234,10 @@ FGRouteMgr::~FGRouteMgr()
   input->removeChangeListener(listener);
   delete listener;
     
+    if (_plan) {
+		_plan->removeDelegate(this);
+	}
+
   //SGCommandMgr* cmdMgr = SGCommandMgr::instance();
   //cmdMgr->removeCommand("define-user-waypoint");
     
diff --git a/src/Instrumentation/HUD/HUD_ladder.cxx b/src/Instrumentation/HUD/HUD_ladder.cxx
index d100054..92a39f6 100644
--- a/src/Instrumentation/HUD/HUD_ladder.cxx
+++ b/src/Instrumentation/HUD/HUD_ladder.cxx
@@ -178,14 +178,14 @@ void HUD::Ladder::draw(void)
             actslope = atan(up_vel / ground_vel) * SGD_RADIANS_TO_DEGREES;
         }
 
-        xvvr = (-drift * (_compression / globals->get_current_view()->get_aspect_ratio()));
+        xvvr = drift * _compression;
         // drift = ((atan2(Vyy, Vxx) * SGD_RADIANS_TO_DEGREES) - psi);
         // yvvr = (-alpha * _compression);
         // vel_y = (-alpha * cos(roll_value) + drift * sin(roll_value)) * _compression;
         // vel_x = (alpha * sin(roll_value) + drift * cos(roll_value))
         //         * (_compression / globals->get_current_view()->get_aspect_ratio());
         vel_y = -alpha * _compression;
-        vel_x = -drift * (_compression / globals->get_current_view()->get_aspect_ratio());
+        vel_x = drift * _compression;
         //  printf("%f %f %f %f\n",vel_x, vel_y, drift, psi);
 
         //****************************************************************
diff --git a/src/Main/bootstrap.cxx b/src/Main/bootstrap.cxx
index 73fb6fd..0a68e23 100644
--- a/src/Main/bootstrap.cxx
+++ b/src/Main/bootstrap.cxx
@@ -236,6 +236,11 @@ int main ( int argc, char **argv )
     // FIXME: add other, more specific
     // exceptions.
     try {
+        // http://code.google.com/p/flightgear-bugs/issues/detail?id=1231
+        // ensure sglog is inited before atexit() is registered, so logging
+        // is possible inside fgExitCleanup
+        sglog();
+        
         std::set_terminate(fg_terminate);
         atexit(fgExitCleanup);
         if (fgviewer)
@@ -277,6 +282,8 @@ void fgExitCleanup() {
     if (_bootstrap_OSInit != 0)
         fgSetMouseCursor(MOUSE_CURSOR_POINTER);
 
+    // on the common exit path globals is already deleted, and NULL,
+    // so this only happens on error paths.
     delete globals;
 }
 
diff --git a/src/Navaids/NavDataCache.cxx b/src/Navaids/NavDataCache.cxx
index e482d4a..5e5d7b4 100644
--- a/src/Navaids/NavDataCache.cxx
+++ b/src/Navaids/NavDataCache.cxx
@@ -1191,7 +1191,11 @@ bool NavDataCache::isRebuildRequired()
       isCachedFileModified(d->metarDatPath) ||
       isCachedFileModified(d->navDatPath) ||
       isCachedFileModified(d->fixDatPath) ||
+// since POI loading is disabled on Windows, don't check for it
+// this caused: https://code.google.com/p/flightgear-bugs/issues/detail?id=1227
+#ifndef SG_WINDOWS
       isCachedFileModified(d->poiDatPath) ||
+#endif
       isCachedFileModified(d->airwayDatPath))
   {
     SG_LOG(SG_NAVCACHE, SG_INFO, "NavCache: main cache rebuild required");
diff --git a/src/Scripting/NasalPositioned.cxx b/src/Scripting/NasalPositioned.cxx
index 9da830f..5cb67be 100644
--- a/src/Scripting/NasalPositioned.cxx
+++ b/src/Scripting/NasalPositioned.cxx
@@ -1118,7 +1118,11 @@ static naRef f_airport_comms(naContext c, naRef me, int argc, naRef* args)
     naRef comms = naNewVector(c);
     
 // if we have an explicit type, return a simple vector of frequencies
-    if (argc > 0 && naIsScalar(args[0])) {
+    if (argc > 0 && !naIsString(args[0])) {
+        naRuntimeError(c, "airport.comms argument must be a frequency type name");
+    }
+    
+    if (argc > 0) {
         std::string commName = naStr_data(args[0]);
         FGPositioned::Type commType = FGPositioned::typeFromName(commName);
         
diff --git a/src/Scripting/NasalSys.cxx b/src/Scripting/NasalSys.cxx
index a0ebb47..91b0920 100644
--- a/src/Scripting/NasalSys.cxx
+++ b/src/Scripting/NasalSys.cxx
@@ -993,12 +993,14 @@ void FGNasalSys::loadPropertyScripts(SGPropertyNode* n)
 // Logs a runtime error, with stack trace, to the FlightGear log stream
 void FGNasalSys::logError(naContext context)
 {
-    SG_LOG(SG_NASAL, SG_ALERT,
-           "Nasal runtime error: " << naGetError(context));
+    SG_LOG(SG_NASAL, SG_ALERT, "Nasal runtime error: " << naGetError(context));
+    int stack_depth = naStackDepth(context);
+    if( stack_depth < 1 )
+      return;
     SG_LOG(SG_NASAL, SG_ALERT,
            "  at " << naStr_data(naGetSourceFile(context, 0)) <<
            ", line " << naGetLine(context, 0));
-    for(int i=1; i<naStackDepth(context); i++)
+    for(int i=1; i<stack_depth; i++)
         SG_LOG(SG_NASAL, SG_ALERT,
                "  called from: " << naStr_data(naGetSourceFile(context, i)) <<
                ", line " << naGetLine(context, i));
diff --git a/version b/version
index d8b6989..3cf561c 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-2.12.0
+2.12.1

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/flightgear.git



More information about the pkg-fgfs-crew mailing list