From: Mathias Froehlich Date: Fri, 2 Mar 2012 21:25:47 +0000 (+0100) Subject: hla: Fix timeAdvanceAvailable handling when no federate is regulating. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=27219e0f5811d46dfcf0b7facfa36d1b5c9101a4;p=simgear.git hla: Fix timeAdvanceAvailable handling when no federate is regulating. --- diff --git a/simgear/hla/HLAFederate.cxx b/simgear/hla/HLAFederate.cxx index 141cbc8e..1b99ff28 100644 --- a/simgear/hla/HLAFederate.cxx +++ b/simgear/hla/HLAFederate.cxx @@ -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();