summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-01-03 13:52:06 +0000
committerrubidium <rubidium@openttd.org>2009-01-03 13:52:06 +0000
commit0d54db5f9fb3a3987f908645ca9693684f34674b (patch)
treed7251708eeba7b26d032505b22c0bb570da26501 /src/train_cmd.cpp
parentfa2bf69a5384a8035a92a069f47f31a178bc3f3c (diff)
downloadopenttd-0d54db5f9fb3a3987f908645ca9693684f34674b.tar.xz
(svn r14803) -Codechange: move order list management into it's own class and remove the order count from the savegame as we can easily count that (PhilSophus)
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index e5a2e75f1..5cf594716 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -1274,8 +1274,7 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p
if (!IsFrontEngine(src)) {
/* setting the type to 0 also involves setting up the orders field. */
SetFrontEngine(src);
- assert(src->orders == NULL);
- src->num_orders = 0;
+ assert(src->orders.list == NULL);
/* Decrease the engines number of the src engine_type */
if (!IsDefaultGroupID(src->group_id) && IsValidGroupID(src->group_id)) {
@@ -1453,8 +1452,7 @@ CommandCost CmdSellRailWagon(TileIndex tile, uint32 flags, uint32 p1, uint32 p2,
first->group_id = DEFAULT_GROUP;
/* Copy orders (by sharing) */
- new_f->orders = first->orders;
- new_f->num_orders = first->GetNumOrders();
+ new_f->orders.list = first->orders.list;
new_f->AddToShared(first);
DeleteVehicleOrders(first);