Changeset - r1141:6d391d24d10f
[Not reviewed]
master
0 1 0
truelight - 19 years ago 2005-01-24 20:20:30
truelight@openttd.org
(svn r1642) -Fix: solve AI related order-problem
1 file changed with 4 insertions and 7 deletions:
ai.c
4
7
0 comments (0 inline, 0 general)
ai.c
Show inline comments
 
@@ -267,14 +267,11 @@ static void AiHandleGotoDepot(Player *p,
 

	
 
static void AiRestoreVehicleOrders(Vehicle *v, BackuppedOrders *bak)
 
{
 
	const Order *os = bak->order;
 
	int ind = 0;
 

	
 
	while (os++->type != OT_NOTHING) {
 
		if (DoCommandByTile(0, v->index + (ind << 16), PackOrder(os), DC_EXEC, CMD_INSERT_ORDER) == CMD_ERROR)
 
	int i;
 

	
 
	for (i = 0; bak->order[i].type != OT_NOTHING; i++)
 
		if (!DoCommandP(0, v->index + (i << 16), PackOrder(&bak->order[i]), NULL, CMD_INSERT_ORDER | CMD_NO_TEST_IF_IN_NETWORK))
 
			break;
 
		ind++;
 
	}
 
}
 

	
 
static void AiHandleReplaceTrain(Player *p)
0 comments (0 inline, 0 general)