diff options
author | rubidium <rubidium@openttd.org> | 2008-04-06 07:22:26 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-04-06 07:22:26 +0000 |
commit | a3224512ccbc50a2bfaf6b3375db78dc5a807dca (patch) | |
tree | 94d7efcddd239260e27551baae6bc2aebe3a5f14 /src/ai/trolly | |
parent | 3edb967ecf7dbf17a4d7e98975cd99345ce5a3f9 (diff) | |
download | openttd-a3224512ccbc50a2bfaf6b3375db78dc5a807dca.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/ai/trolly')
-rw-r--r-- | src/ai/trolly/trolly.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/trolly/trolly.cpp b/src/ai/trolly/trolly.cpp index 30714aed0..2876d240e 100644 --- a/src/ai/trolly/trolly.cpp +++ b/src/ai/trolly/trolly.cpp @@ -1185,20 +1185,20 @@ static void AiNew_State_GiveOrders(Player *p) if (_patches.gotodepot) { idx = 0; order.MakeGoToDepot(GetDepotByTile(_players_ainew[p->index].depot_tile)->index, true); - AI_DoCommand(0, _players_ainew[p->index].veh_id + (idx << 16), PackOrder(&order), DC_EXEC, CMD_INSERT_ORDER); + AI_DoCommand(0, _players_ainew[p->index].veh_id + (idx << 16), order.Pack(), DC_EXEC, CMD_INSERT_ORDER); } idx = 0; order.MakeGoToStation(GetStationIndex(_players_ainew[p->index].to_tile)); if (_players_ainew[p->index].tbt == AI_TRUCK && _players_ainew[p->index].to_deliver) order.flags |= OFB_FULL_LOAD; - AI_DoCommand(0, _players_ainew[p->index].veh_id + (idx << 16), PackOrder(&order), DC_EXEC, CMD_INSERT_ORDER); + AI_DoCommand(0, _players_ainew[p->index].veh_id + (idx << 16), order.Pack(), DC_EXEC, CMD_INSERT_ORDER); idx = 0; order.MakeGoToStation(GetStationIndex(_players_ainew[p->index].from_tile)); if (_players_ainew[p->index].tbt == AI_TRUCK && _players_ainew[p->index].from_deliver) order.flags |= OFB_FULL_LOAD; - AI_DoCommand(0, _players_ainew[p->index].veh_id + (idx << 16), PackOrder(&order), DC_EXEC, CMD_INSERT_ORDER); + AI_DoCommand(0, _players_ainew[p->index].veh_id + (idx << 16), order.Pack(), DC_EXEC, CMD_INSERT_ORDER); // Start the engines! _players_ainew[p->index].state = AI_STATE_START_VEHICLE; |