Skip to content

Commit

Permalink
Fix f6dd505: Missing savegame conversion for current_order (OpenTTD#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
glx22 authored Feb 27, 2024
1 parent d4f0f0e commit fad7726
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/saveload/afterload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,11 @@ bool AfterLoadGame()
if (!order->IsType(OT_GOTO_DEPOT)) continue;
order->SetDepotActionType((OrderDepotActionFlags)(order->GetDepotActionType() >> 1));
}

for (Vehicle *v : Vehicle::Iterate()) {
if (!v->current_order.IsType(OT_GOTO_DEPOT)) continue;
v->current_order.SetDepotActionType((OrderDepotActionFlags)(v->current_order.GetDepotActionType() >> 1));
}
}

/* The water class was moved/unified. */
Expand Down

0 comments on commit fad7726

Please sign in to comment.