X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2FAIAircraft.cxx;h=a525d7ef1bd427449b8562c9ac25b10fbdd07a53;hb=9cd3adb3a5487bbb51d42770d1df6112717f3f0d;hp=ac79b97cc7f19aaad3f854f075d9c06be9bc3284;hpb=9197057784f8f68e83fca30a234630dc3ccf4422;p=flightgear.git diff --git a/src/AIModel/AIAircraft.cxx b/src/AIModel/AIAircraft.cxx index ac79b97cc..a525d7ef1 100644 --- a/src/AIModel/AIAircraft.cxx +++ b/src/AIModel/AIAircraft.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -421,7 +422,7 @@ void FGAIAircraft::getGroundElev(double dt) { double range = 500.0; if (!globals->get_tile_mgr()->scenery_available(pos, range)) { // Try to shedule tiles for that position. - globals->get_tile_mgr()->update( pos, range ); + globals->get_tile_mgr()->schedule_tiles_at( pos, range ); } double alt; @@ -648,7 +649,7 @@ bool FGAIAircraft::leadPointReached(FGAIFlightPlan::waypoint* curr) { // << dist_to_go << ": Lead distance " // << lead_dist << " " << curr->name // << " Ground target speed " << groundTargetSpeed << endl; - double bearing; + double bearing = 0; if (speed > 50) { // don't do bearing calculations for ground traffic bearing = getBearing(fp->getBearing(pos.getLatitudeDeg(), pos.getLongitudeDeg(), curr)); if (bearing < minBearing) {