1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-22 05:59:10 +00:00

(svn r12587) -Codechange: unduplicate some code in the Unpack*Order functions and move the 'normal' case Pack/Unpack to Order.

This commit is contained in:
rubidium
2008-04-06 07:22:26 +00:00
parent e68b2088ce
commit 8cd1795fe3
7 changed files with 56 additions and 70 deletions

View File

@@ -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;