summaryrefslogtreecommitdiff
path: root/src/autoreplace_cmd.cpp
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2008-05-04 10:05:35 +0000
committerbjarni <bjarni@openttd.org>2008-05-04 10:05:35 +0000
commitdbf6e344a419cf453ce8a292a588385b5299c996 (patch)
treec16aecefc1241e86133980055d11b5c8aadaa468 /src/autoreplace_cmd.cpp
parent8ca10353163dfb34174b4c2a1fad94c3286bb868 (diff)
downloadopenttd-dbf6e344a419cf453ce8a292a588385b5299c996.tar.xz
(svn r12940) -Fix [FS#1974](r12913): [autoreplace] a vehicle backup should include the cargo packets in the vehicle as well
Diffstat (limited to 'src/autoreplace_cmd.cpp')
-rw-r--r--src/autoreplace_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp
index 6d41893bd..4499a2d04 100644
--- a/src/autoreplace_cmd.cpp
+++ b/src/autoreplace_cmd.cpp
@@ -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 */