Codechange: Use a dedicated variable for disaster vehicle action state. (#10798)

This commit is contained in:
Michael Lutz
2023-05-12 21:41:36 +02:00
committed by GitHub
parent 1a93618bd1
commit 72c7536325
6 changed files with 44 additions and 37 deletions
+4
View File
@@ -1347,6 +1347,10 @@ bool LoadOldVehicle(LoadgameState *ls, int num)
}
v->current_order.AssignOrder(UnpackOldOrder(_old_order));
if (v->type == VEH_DISASTER) {
DisasterVehicle::From(v)->state = UnpackOldOrder(_old_order).GetDestination();
}
v->next = (Vehicle *)(size_t)_old_next_ptr;
if (_cargo_count != 0 && CargoPacket::CanAllocateItem()) {