mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 10:30:28 +00:00
(svn r25562) -Fix [FS#5633]: If the next order cannot be resolved, reset the current order property instead of leaving it in an intermediate state.
This commit is contained in:
parent
c6aad246c9
commit
840f836704
@ -2025,7 +2025,11 @@ VehicleOrderID ProcessConditionalOrder(const Order *order, const Vehicle *v)
|
|||||||
*/
|
*/
|
||||||
bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool pbs_look_ahead)
|
bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool pbs_look_ahead)
|
||||||
{
|
{
|
||||||
if (conditional_depth > v->GetNumOrders()) return false;
|
if (conditional_depth > v->GetNumOrders()) {
|
||||||
|
v->current_order.Free();
|
||||||
|
v->dest_tile = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
switch (order->GetType()) {
|
switch (order->GetType()) {
|
||||||
case OT_GOTO_STATION:
|
case OT_GOTO_STATION:
|
||||||
|
Loading…
Reference in New Issue
Block a user