diff options
author | truelight <truelight@openttd.org> | 2005-02-06 10:18:47 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2005-02-06 10:18:47 +0000 |
commit | e9c93f9c0ca76117ac1315b6aff03f1f138f62e4 (patch) | |
tree | 0b6bfe4dfd7abf3e94d0f7210b1b842e429c4a02 /ai_new.c | |
parent | 6493e12bfbb147e41fc0f533bb3618b2931fed1f (diff) | |
download | openttd-e9c93f9c0ca76117ac1315b6aff03f1f138f62e4.tar.xz |
(svn r1817) -Codechange: Moved depot-functions to depot.c
-Codechange: Added wrappers around depot-access (GetDepot no exists)
-Codechange: Made depot-functions a bit more logic (no longer
GetDepotByTile crashes your game when you request it on a non-depot tile)
-Add: made depots dynamic (yes, 64k depots are possible now)
Diffstat (limited to 'ai_new.c')
-rw-r--r-- | ai_new.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -26,6 +26,7 @@ #include "station.h" #include "engine.h" #include "gui.h" +#include "depot.h" // This function is called after StartUp. It is the init of an AI static void AiNew_State_FirstTime(Player *p) { @@ -1166,7 +1167,7 @@ static void AiNew_State_GiveOrders(Player *p) { idx = 2; order.type = OT_GOTO_DEPOT; order.flags = OF_UNLOAD; - order.station = GetDepotByTile(p->ainew.depot_tile); + order.station = GetDepotByTile(p->ainew.depot_tile)->index; DoCommandByTile(0, p->ainew.veh_id + (idx << 16), PackOrder(&order), DC_EXEC, CMD_INSERT_ORDER); } |