X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2FAIBallistic.cxx;h=16b15fe1d93f3aec36cb81a45ad6631c09a3398c;hb=38226af24ec01e8f0a20d7fd73ef838a69f6ef25;hp=aaf52337093a0ec7d9eaebb82ec8bd1d08137e77;hpb=141186a358d07141eac151c287761eed6d81b68c;p=flightgear.git diff --git a/src/AIModel/AIBallistic.cxx b/src/AIModel/AIBallistic.cxx index aaf523370..16b15fe1d 100644 --- a/src/AIModel/AIBallistic.cxx +++ b/src/AIModel/AIBallistic.cxx @@ -41,10 +41,12 @@ const double FGAIBallistic::slugs_to_lbs = 32.1740485564; FGAIBallistic::FGAIBallistic(object_type ot) : FGAIBase(ot), _height(0.0), +_speed(0), _ht_agl_ft(0.0), _azimuth(0.0), _elevation(0.0), _rotation(0.0), +hs(0), _elapsed_time(0), _aero_stabilised(false), _drag_area(0.007), @@ -65,9 +67,7 @@ _report_impact(false), _external_force(false), _report_expiry(false), _impact_report_node(fgGetNode("/ai/models/model-impact", true)), -hs(0), -_old_height(0), -_speed() +_old_height(0) { no_roll = false; @@ -152,11 +152,11 @@ bool FGAIBallistic::init(bool search_in_AI_path) { props->setStringValue("contents/path", _contents_path.c_str()); } - if(_parent != ""){ - setParentNode(); - } + //if(_parent != ""){ + // setParentNode(); + //} - setParentNodes(_selected_ac); + //setParentNodes(_selected_ac); //props->setStringValue("vector/path", _vector_path.c_str()); @@ -168,7 +168,11 @@ bool FGAIBallistic::init(bool search_in_AI_path) { Transform(); - //cout << _name << " speed init: " << speed << endl; + if(_parent != ""){ + setParentNode(); + } + + setParentNodes(_selected_ac); return true; }