diff options
author | Darkvater <darkvater@openttd.org> | 2006-12-26 17:36:18 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-12-26 17:36:18 +0000 |
commit | 073e0eb3c9148d6dd8b2c9ce788843b8180351cb (patch) | |
tree | 8dae47833ded5c522ac7a89f69f10fc0c2530e90 /ai/trolly/build.c | |
parent | 2e0bbe540383c96f4356dd75e70bb1fa5c8e95be (diff) | |
download | openttd-073e0eb3c9148d6dd8b2c9ce788843b8180351cb.tar.xz |
(svn r7565) -Codechange: Rework DEBUG functionality. Look for appropiate debugging levels to
use in debug.h. grfmsg() is now used as a specific debug-function for grf.
Diffstat (limited to 'ai/trolly/build.c')
-rw-r--r-- | ai/trolly/build.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ai/trolly/build.c b/ai/trolly/build.c index f61521ba7..9959d0d04 100644 --- a/ai/trolly/build.c +++ b/ai/trolly/build.c @@ -116,7 +116,7 @@ int AiNew_Build_RoutePart(Player *p, Ai_PathFinderInfo *PathFinderInfo, byte fla 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 @@ int AiNew_Build_RoutePart(Player *p, Ai_PathFinderInfo *PathFinderInfo, byte fla 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 @@ int AiNew_Build_RoutePart(Player *p, Ai_PathFinderInfo *PathFinderInfo, byte fla 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 @@ int AiNew_Build_RoutePart(Player *p, Ai_PathFinderInfo *PathFinderInfo, byte fla 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 @@ int AiNew_Build_RoutePart(Player *p, Ai_PathFinderInfo *PathFinderInfo, byte fla // 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; } |