summaryrefslogtreecommitdiff
path: root/src/newgrf_engine.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-06 07:22:26 +0000
committerrubidium <rubidium@openttd.org>2008-04-06 07:22:26 +0000
commit8cd1795fe32fc2afaa75f48b8b62ff992bf8f618 (patch)
tree94d7efcddd239260e27551baae6bc2aebe3a5f14 /src/newgrf_engine.cpp
parente68b2088ce090c1eaf182e120195d8453f4f02c2 (diff)
downloadopenttd-8cd1795fe32fc2afaa75f48b8b62ff992bf8f618.tar.xz
(svn r12587) -Codechange: unduplicate some code in the Unpack*Order functions and move the 'normal' case Pack/Unpack to Order.
Diffstat (limited to 'src/newgrf_engine.cpp')
-rw-r--r--src/newgrf_engine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp
index b438d838d..e56c2dda2 100644
--- a/src/newgrf_engine.cpp
+++ b/src/newgrf_engine.cpp
@@ -681,8 +681,8 @@ static uint32 VehicleGetVariable(const ResolverObject *object, byte variable, by
case 0x01: return MapOldSubType(v);
case 0x04: return v->index;
case 0x05: return GB(v->index, 8, 8);
- case 0x0A: return PackOrder(&v->current_order);
- case 0x0B: return GB(PackOrder(&v->current_order), 8, 8);
+ case 0x0A: return v->current_order.Pack();
+ case 0x0B: return GB(v->current_order.Pack(), 8, 8);
case 0x0C: return v->num_orders;
case 0x0D: return v->cur_order_index;
case 0x10: return v->load_unload_time_rem;