(reported by Csaba Halaszi /helijah)
2) Decrease AI aircraft Heading error tolerance to 1% of its
original value. This is necessary to mitigate spinning and
makes for actual "on-runway" landings.
if (finite(calc_bearing)) {
double hdg_error = calc_bearing - tgt_heading;
- if (fabs(hdg_error) > 1.0) {
+ if (fabs(hdg_error) > 0.01) {
TurnTo( calc_bearing );
}
if (fabs(speed_diff) > 10) {
prevSpeed = speed;
- fp->setLeadDistance(speed, tgt_heading, curr, next);
+ if (next) {
+ fp->setLeadDistance(speed, tgt_heading, curr, next);
+ }
}
}