ai/trolly/build.c
changeset 5380 8ea58542b6e0
parent 5032 dec7bde5a321
--- a/ai/trolly/build.c	Tue Dec 26 17:22:47 2006 +0000
+++ b/ai/trolly/build.c	Tue Dec 26 17:36:18 2006 +0000
@@ -116,7 +116,7 @@
 			PathFinderInfo->position++;
 			// TODO: problems!
 			if (CmdFailed(cost)) {
-				DEBUG(ai,0)("[AiNew - BuildPath] We have a serious problem: tunnel could not be built!");
+				DEBUG(ai, 0, "[BuildPath] tunnel could not be built (0x%X)", route[part]);
 				return 0;
 			}
 			return cost;
@@ -127,7 +127,7 @@
 			PathFinderInfo->position++;
 			// TODO: problems!
 			if (CmdFailed(cost)) {
-				DEBUG(ai,0)("[AiNew - BuildPath] We have a serious problem: bridge could not be built!");
+				DEBUG(ai, 0, "[BuildPath] bridge could not be built (0x%X, 0x%X)", route[part], route[part - 1]);
 				return 0;
 			}
 			return cost;
@@ -166,7 +166,7 @@
 			PathFinderInfo->position++;
 			// TODO: problems!
 			if (CmdFailed(cost)) {
-				DEBUG(ai,0)("[AiNew - BuildPath] We have a serious problem: tunnel could not be built!");
+				DEBUG(ai, 0, "[BuildPath] tunnel could not be built (0x%X)", route[part]);
 				return 0;
 			}
 			return cost;
@@ -177,7 +177,7 @@
 			PathFinderInfo->position++;
 			// TODO: problems!
 			if (CmdFailed(cost)) {
-				DEBUG(ai,0)("[AiNew - BuildPath] We have a serious problem: bridge could not be built!");
+				DEBUG(ai, 0, "[BuildPath] bridge could not be built (0x%X, 0x%X)", route[part], route[part + 1]);
 				return 0;
 			}
 			return cost;
@@ -201,7 +201,7 @@
 					// Currently, we ignore CMD_ERRORs!
 					if (CmdFailed(res) && flag == DC_EXEC && !IsTileType(route[part], MP_STREET) && !EnsureNoVehicle(route[part])) {
 						// Problem.. let's just abort it all!
-						DEBUG(ai,0)("Darn, the route could not be built.. aborting!");
+						DEBUG(ai, 0, "[BuidPath] route building failed at tile 0x%X, aborting", route[part]);
 						p->ainew.state = AI_STATE_NOTHING;
 						return 0;
 					}