X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2FAIShip.cxx;h=9b6a0470524e8fc2b017bc4fd3a412875a91abe0;hb=38226af24ec01e8f0a20d7fd73ef838a69f6ef25;hp=b27b21d965dff8fd484489a362e05a9b6926b5b8;hpb=bc12f0be21d703653620743b6bf86db7c78a69cd;p=flightgear.git diff --git a/src/AIModel/AIShip.cxx b/src/AIModel/AIShip.cxx index b27b21d96..9b6a04705 100644 --- a/src/AIModel/AIShip.cxx +++ b/src/AIModel/AIShip.cxx @@ -43,35 +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) - +_missed(false) { invisible = false; } @@ -490,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; } @@ -624,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;