mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r12343) -Fix (r12293): Slow helicopters never got the 'chance' to finish the landing routine.
This commit is contained in:
parent
cd411ab75a
commit
b4a51cd28d
@ -1105,8 +1105,6 @@ static bool AircraftController(Vehicle *v)
|
||||
|
||||
/* Helicopter landing. */
|
||||
if (amd->flag & AMED_HELI_LOWER) {
|
||||
count = UpdateAircraftSpeed(v);
|
||||
if (count > 0) {
|
||||
if (st->airport_tile == 0) {
|
||||
/* FIXME - AircraftController -> if station no longer exists, do not land
|
||||
* helicopter will circle until sign disappears, then go to next order
|
||||
@ -1129,12 +1127,16 @@ static bool AircraftController(Vehicle *v)
|
||||
/* Increase speed of rotors. When speed is 80, we've landed. */
|
||||
if (u->cur_speed >= 80) return true;
|
||||
u->cur_speed += 4;
|
||||
} else if (v->z_pos > z) {
|
||||
} else {
|
||||
count = UpdateAircraftSpeed(v);
|
||||
if (count > 0) {
|
||||
if (v->z_pos > z) {
|
||||
SetAircraftPosition(v, v->x_pos, v->y_pos, max(v->z_pos - count, z));
|
||||
} else {
|
||||
SetAircraftPosition(v, v->x_pos, v->y_pos, min(v->z_pos + count, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user