From dbd0b136b81be7eb124535b2628cedcc14e69f0c Mon Sep 17 00:00:00 2001
From: mfranz <mfranz>
Date: Tue, 16 Oct 2007 15:01:19 +0000
Subject: [PATCH] - use refcounted node pointers, so that no subsystem (nasal!)
 can invalidate them - add frame signal for debugging purposes

---
 src/Main/main.cxx | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/Main/main.cxx b/src/Main/main.cxx
index cd6b71b30..ebb0230a8 100644
--- a/src/Main/main.cxx
+++ b/src/Main/main.cxx
@@ -205,19 +205,22 @@ static const double alt_adjust_m = alt_adjust_ft * SG_FEET_TO_METER;
 static void fgMainLoop( void ) {
     int model_hz = fgGetInt("/sim/model-hz");
 
-    static const SGPropertyNode *longitude
+    static SGConstPropertyNode_ptr longitude
         = fgGetNode("/position/longitude-deg");
-    static const SGPropertyNode *latitude
+    static SGConstPropertyNode_ptr latitude
         = fgGetNode("/position/latitude-deg");
-    static const SGPropertyNode *altitude
+    static SGConstPropertyNode_ptr altitude
         = fgGetNode("/position/altitude-ft");
-    static const SGPropertyNode *clock_freeze
+    static SGConstPropertyNode_ptr clock_freeze
         = fgGetNode("/sim/freeze/clock", true);
-    static const SGPropertyNode *cur_time_override
+    static SGConstPropertyNode_ptr cur_time_override
         = fgGetNode("/sim/time/cur-time-override", true);
-    static const SGPropertyNode *max_simtime_per_frame
+    static SGConstPropertyNode_ptr max_simtime_per_frame
         = fgGetNode("/sim/max-simtime-per-frame", true);
+    static SGPropertyNode_ptr frame_signal
+        = fgGetNode("/sim/signals/frame", true);
 
+    frame_signal->setBoolValue(true);
     SGCloudLayer::enable_bump_mapping = fgGetBool("/sim/rendering/bump-mapping");
 
     bool scenery_loaded = fgGetBool("sim/sceneryloaded");