]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/marker_beacon.cxx
Canvas: Performance improvements.
[flightgear.git] / src / Instrumentation / marker_beacon.cxx
index 5fa56fadef3d3379887e87baee19ba4857f78947..41b981536a6262e6da037e66b03e5523bda64518 100644 (file)
@@ -43,7 +43,6 @@ using std::string;
 // Constructor
 FGMarkerBeacon::FGMarkerBeacon(SGPropertyNode *node) :
     audio_vol(NULL),
-    need_update(true),
     outer_blink(false),
     middle_blink(false),
     inner_blink(false),
@@ -121,12 +120,17 @@ FGMarkerBeacon::init ()
     _sgr = smgr->find("avionics", true);
     _sgr->tie_to_listener();
 
-    blink.stamp();
+    reinit();
+}
 
+void
+FGMarkerBeacon::reinit ()
+{
+    blink.stamp();
     outer_marker = middle_marker = inner_marker = false;
+    _time_before_search_sec = 0.0;
 }
 
-
 void
 FGMarkerBeacon::bind ()
 {
@@ -160,8 +164,6 @@ FGMarkerBeacon::unbind ()
 void
 FGMarkerBeacon::update(double dt)
 {
-    need_update = false;
-
     // On timeout, scan again, this needs to run every iteration no
     // matter what the power or serviceable state.  If power is turned
     // off or the unit becomes unserviceable while a beacon sound is