X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fagradar.cxx;h=e5be21b86332a2066333b7ead655e29d6c31088b;hb=caf0138ab35b03bbe7bf367ff2222d0a31be3157;hp=4e47d38e7c48e780d32a9c6e460afd8af8bfe0f8;hpb=662ea715e813a73053299c83aeeb7f6c5b496772;p=flightgear.git diff --git a/src/Instrumentation/agradar.cxx b/src/Instrumentation/agradar.cxx index 4e47d38e7..e5be21b86 100644 --- a/src/Instrumentation/agradar.cxx +++ b/src/Instrumentation/agradar.cxx @@ -25,6 +25,8 @@ # include "config.h" #endif +#include
+#include
#include "agradar.hxx" @@ -100,13 +102,8 @@ agRadar::init () void agRadar::update (double delta_time_sec) { - if ( ! _sim_init_done ) { - - if ( ! fgGetBool("sim/sceneryloaded", false) ) - return; - - _sim_init_done = true; - } + if (!_sceneryLoaded->getBoolValue()) + return; if ( !_odg || ! _serviceable_node->getBoolValue() ) { _Instrument->setStringValue("status",""); @@ -120,7 +117,6 @@ agRadar::update (double delta_time_sec) _time = 0.0; - update_terrain(); // wxRadarBg::update(delta_time_sec); } @@ -187,7 +183,6 @@ agRadar::setUserVec(double az, double el) float yaw = _user_hdg_deg_node->getDoubleValue(); float pitch = _user_pitch_deg_node->getDoubleValue(); float roll = _user_roll_deg_node->getDoubleValue(); - int mode = _radar_mode_control_node->getIntValue(); double tilt = _Instrument->getDoubleValue("tilt"); double trk = _Instrument->getDoubleValue("trk"); bool roll_stab = _Instrument->getBoolValue("stabilisation/roll"); @@ -218,7 +213,7 @@ agRadar::getMaterial(){ if (globals->get_scenery()->get_elevation_m(hitpos, _elevation_m, &_material)){ //_ht_agl_ft = pos.getElevationFt() - _elevation_m * SG_METER_TO_FEET; if (_material) { - const vector& names = _material->get_names(); + const std::vector& names = _material->get_names(); _solid = _material->get_solid(); _load_resistance = _material->get_load_resistance(); @@ -258,8 +253,7 @@ agRadar::update_terrain() double tilt = -2.5; bool roll_stab = _rollStabNode->getBoolValue(); bool pitch_stab = _pitchStabNode->getBoolValue(); - //string status = ""; - const char* status; + const char* status = ""; bool hdg_mkr = true; if (mode == 5){