X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2FAIShip.cxx;h=9b6a0470524e8fc2b017bc4fd3a412875a91abe0;hb=38226af24ec01e8f0a20d7fd73ef838a69f6ef25;hp=a00f9c941a9e5a99346ba639c14cf349cb2f4dfd;hpb=f08012d14f6c5093ac7d849f523279233f51d90f;p=flightgear.git diff --git a/src/AIModel/AIShip.cxx b/src/AIModel/AIShip.cxx index a00f9c941..9b6a04705 100644 --- a/src/AIModel/AIShip.cxx +++ b/src/AIModel/AIShip.cxx @@ -43,36 +43,35 @@ FGAIShip::FGAIShip(object_type ot) : FGAIBase(ot), + + +_waiting(false), +_new_waypoint(true), +_tunnel(false), +_initial_tunnel(false), +_restart(false), +_hdg_constant(0.01), _limit(100), _elevation_m(0), _elevation_ft(0), _tow_angle(0), +_missed_count(0), +_wp_range(0), _dt_count(0), _next_run(0), +_roll_constant(0.001), +_roll_factor(-0.0083335), +_old_range(0), +_range_rate(0), +_missed_time_sec(30), +_day(86400), _lead_angle(0), _xtrack_error(0), -_tunnel(false), -_initial_tunnel(false), _curr_alt(0), _prev_alt(0), _until_time(""), _fp_init(false), -_missed(false), -_waiting(false), -_new_waypoint(true), -_missed_count(0), -_wait_count(0), -_missed_time_sec(30), -_day(86400), -_wp_range(0), -_old_range(0), -_range_rate(0), -_roll_constant(0.001), -_hdg_constant(0.01), -_roll_factor(-0.0083335), -_restart(false), -_name("") - +_missed(false) { invisible = false; } @@ -491,10 +490,6 @@ void FGAIShip::setFlightPlan(FGAIFlightPlan* f) { fp = f; } -void FGAIShip::setName(const string& n) { - _name = n; -} - void FGAIShip::setStartTime(const string& st) { _start_time = st; } @@ -625,6 +620,10 @@ double FGAIShip::getCourse(double lat, double lon, double lat2, double lon2) con void FGAIShip::ProcessFlightPlan(double dt) { + if ( dt < 0.00001 ) { + return; + } + double time_sec = getDaySeconds(); _dt_count += dt;