AIGroundVehicle: remove always true condition
This commit is contained in:
parent
4d10f37992
commit
17fde93fb2
1 changed files with 3 additions and 4 deletions
|
@ -431,14 +431,14 @@ void FGAIGroundVehicle::setTowSpeed(){
|
||||||
|
|
||||||
if (_range_ft > _x_offset * 3) x = 50;
|
if (_range_ft > _x_offset * 3) x = 50;
|
||||||
|
|
||||||
if (_relbrg < -90 || _relbrg > 90){
|
if (_relbrg < -90 || _relbrg > 90) {
|
||||||
setSpeed(_parent_speed - 5 - x);
|
setSpeed(_parent_speed - 5 - x);
|
||||||
//cout << _name << " case 1r _relbrg spd - 5 " << _relbrg << " " << diff << endl;
|
//cout << _name << " case 1r _relbrg spd - 5 " << _relbrg << " " << diff << endl;
|
||||||
}else if (_range_ft > _x_offset + 0.25 && _relbrg >= -90 && _relbrg <= 90){
|
} else if (_range_ft > _x_offset + 0.25) {
|
||||||
setSpeed(_parent_speed + 1 + x);
|
setSpeed(_parent_speed + 1 + x);
|
||||||
//cout << _name << " case 2r _relbrg spd + 1 " << _relbrg << " "
|
//cout << _name << " case 2r _relbrg spd + 1 " << _relbrg << " "
|
||||||
// << diff << " range " << _range_ft << endl;
|
// << diff << " range " << _range_ft << endl;
|
||||||
} else if (_range_ft < _x_offset - 0.25 && _relbrg >= -90 && _relbrg <= 90){
|
} else if (_range_ft < _x_offset - 0.25) {
|
||||||
setSpeed(_parent_speed - 1 - x);
|
setSpeed(_parent_speed - 1 - x);
|
||||||
//cout << _name << " case 3r _relbrg spd - 2 " << _relbrg << " "
|
//cout << _name << " case 3r _relbrg spd - 2 " << _relbrg << " "
|
||||||
// << diff << " " << _range_ft << endl;
|
// << diff << " " << _range_ft << endl;
|
||||||
|
@ -446,7 +446,6 @@ void FGAIGroundVehicle::setTowSpeed(){
|
||||||
setSpeed(_parent_speed);
|
setSpeed(_parent_speed);
|
||||||
//cout << _name << " else r _relbrg " << _relbrg << " " << diff << endl;
|
//cout << _name << " else r _relbrg " << _relbrg << " " << diff << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FGAIGroundVehicle::RunGroundVehicle(double dt){
|
void FGAIGroundVehicle::RunGroundVehicle(double dt){
|
||||||
|
|
Loading…
Reference in a new issue