]> git.mxchange.org Git - simgear.git/commitdiff
hla: Fix timeAdvanceAvailable handling when no federate is regulating.
authorMathias Froehlich <Mathias.Froehlich@web.de>
Fri, 2 Mar 2012 21:25:47 +0000 (22:25 +0100)
committerMathias Froehlich <Mathias.Froehlich@web.de>
Fri, 2 Mar 2012 21:25:47 +0000 (22:25 +0100)
simgear/hla/HLAFederate.cxx

index 141cbc8e91dbce28c87b7a7574383875fe1fe420..1b99ff28c3e4b29e591d74485915297212345ee4 100644 (file)
@@ -649,14 +649,11 @@ HLAFederate::timeAdvanceAvailable()
     }
 
     SGTimeStamp timeStamp;
-    if (!_rtiFederate->queryGALT(timeStamp)) {
-        SG_LOG(SG_NETWORK, SG_WARN, "HLA: Could not query GALT!");
-        return false;
-    }
-
-    if (!_rtiFederate->timeAdvanceRequestAvailable(timeStamp)) {
-        SG_LOG(SG_NETWORK, SG_WARN, "HLA: Time advance request failed!");
-        return false;
+    if (_rtiFederate->queryGALT(timeStamp)) {
+        if (!_rtiFederate->timeAdvanceRequestAvailable(timeStamp)) {
+            SG_LOG(SG_NETWORK, SG_WARN, "HLA: Time advance request failed!");
+            return false;
+        }
     }
 
     return processMessages();