summaryrefslogtreecommitdiff
path: root/npf.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-02-21 01:15:59 +0000
committerDarkvater <darkvater@openttd.org>2006-02-21 01:15:59 +0000
commite9e4b7735fcc344742dce3e1504f0c6d274d23f6 (patch)
treec5d27826dccedcd74065e17733b1d599d9d6f336 /npf.c
parent4aaae55c0851ce0b64dfd397d7180f3366ea2000 (diff)
downloadopenttd-e9e4b7735fcc344742dce3e1504f0c6d274d23f6.tar.xz
(svn r3642) There is a 'npf' debug level for a reason, use that instead of bastardizing 'misc'. Also, pointers are checked against NULL in an if-statement
Diffstat (limited to 'npf.c')
-rw-r--r--npf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/npf.c b/npf.c
index 2285af1c4..e6c9f9fb1 100644
--- a/npf.c
+++ b/npf.c
@@ -697,11 +697,11 @@ static NPFFoundTargetData NPFRouteInternal(AyStarNode* start1, AyStarNode* start
assert(r != AYSTAR_STILL_BUSY);
if (result.best_bird_dist != 0) {
- if (target) {
- DEBUG(misc, 1) ("NPF: Could not find route to 0x%x from 0x%x.", target->dest_coords, start1->tile);
+ if (target != NULL) {
+ DEBUG(npf, 1) ("Could not find route to tile 0x%x from 0x%x.", target->dest_coords, start1->tile);
} else {
/* Assumption: target == NULL, so we are looking for a depot */
- DEBUG(misc, 1) ("NPF: Could not find route to a depot from 0x%x.", start1->tile);
+ DEBUG(npf, 1) ("Could not find route to a depot from tile 0x%x.", start1->tile);
}
}
@@ -849,7 +849,7 @@ NPFFoundTargetData NPFRouteToDepotTrialError(TileIndex tile, Trackdir trackdir,
best_result = result;
}
if (result.best_bird_dist != 0) {
- DEBUG(misc, 1) ("NPF: Could not find route to any depot from 0x%x.", tile);
+ DEBUG(npf, 1) ("Could not find route to any depot from tile 0x%x.", tile);
}
return best_result;
}