mirror of https://github.com/OpenTTD/OpenTTD
(svn r17415) -Change: make sure aircraft don't move while turning as long as they are on the ground. This prevents a lot of unnecesary turns when leaving terminals
parent
27738c6638
commit
e540385038
|
@ -1077,14 +1077,26 @@ static bool AircraftController(Aircraft *v)
|
||||||
v->last_direction = v->direction;
|
v->last_direction = v->direction;
|
||||||
v->direction = newdir;
|
v->direction = newdir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Move vehicle. */
|
||||||
|
gp = GetNewVehiclePos(v);
|
||||||
} else {
|
} else {
|
||||||
v->cur_speed >>= 1;
|
v->cur_speed >>= 1;
|
||||||
v->direction = newdir;
|
v->direction = newdir;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Move vehicle. */
|
/* When leaving a terminal an aircraft often goes to a position
|
||||||
gp = GetNewVehiclePos(v);
|
* directly in front of it. If it would move while turning it
|
||||||
|
* would need an two extra turns to end up at the correct position.
|
||||||
|
* To make it easier just disallow all moving while turning as
|
||||||
|
* long as an aircraft is on the ground. */
|
||||||
|
gp.x = v->x_pos;
|
||||||
|
gp.y = v->y_pos;
|
||||||
|
gp.new_tile = gp.old_tile = v->tile;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
/* Move vehicle. */
|
||||||
|
gp = GetNewVehiclePos(v);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
v->tile = gp.new_tile;
|
v->tile = gp.new_tile;
|
||||||
|
|
Loading…
Reference in New Issue