mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r1642) -Fix: solve AI related order-problem
This commit is contained in:
parent
7f14b69022
commit
7a5ce1cb34
9
ai.c
9
ai.c
@ -267,14 +267,11 @@ static void AiHandleGotoDepot(Player *p, int cmd)
|
|||||||
|
|
||||||
static void AiRestoreVehicleOrders(Vehicle *v, BackuppedOrders *bak)
|
static void AiRestoreVehicleOrders(Vehicle *v, BackuppedOrders *bak)
|
||||||
{
|
{
|
||||||
const Order *os = bak->order;
|
int i;
|
||||||
int ind = 0;
|
|
||||||
|
|
||||||
while (os++->type != OT_NOTHING) {
|
for (i = 0; bak->order[i].type != OT_NOTHING; i++)
|
||||||
if (DoCommandByTile(0, v->index + (ind << 16), PackOrder(os), DC_EXEC, CMD_INSERT_ORDER) == CMD_ERROR)
|
if (!DoCommandP(0, v->index + (i << 16), PackOrder(&bak->order[i]), NULL, CMD_INSERT_ORDER | CMD_NO_TEST_IF_IN_NETWORK))
|
||||||
break;
|
break;
|
||||||
ind++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AiHandleReplaceTrain(Player *p)
|
static void AiHandleReplaceTrain(Player *p)
|
||||||
|
Loading…
Reference in New Issue
Block a user