(svn r12940) -Fix [FS#1974](r12913): [autoreplace] a vehicle backup should include the cargo packets in the vehicle as well

This commit is contained in:
bjarni
2008-05-04 10:05:35 +00:00
parent 8ca1035316
commit dbf6e344a4
5 changed files with 105 additions and 30 deletions

View File

@@ -442,7 +442,7 @@ CommandCost MaybeReplaceVehicle(Vehicle *v, uint32 flags, bool display_costs)
if (flags & DC_QUERY_COST || cost.GetCost() == 0) {
/* We didn't do anything during the replace so we will just exit here */
v = backup.Restore(v);
v = backup.Restore(v, p);
if (stopped) v->vehstatus &= ~VS_STOPPED;
return cost;
}
@@ -482,7 +482,7 @@ CommandCost MaybeReplaceVehicle(Vehicle *v, uint32 flags, bool display_costs)
}
if (!(flags & DC_EXEC) || CmdFailed(cost)) {
v = backup.Restore(v);
v = backup.Restore(v, p);
}
/* Start the vehicle if we stopped it earlier */