(bestownedpath): Return NULL on long path instead of "?". Terminate

returned path with 'h'.  This makes BestShipPath() and BestAirPath()
more similar to BestLandPath().  Simplify callers.
This commit is contained in:
Markus Armbruster 2006-04-05 09:30:38 +00:00
parent 9c27a771b3
commit abb9ae2338
3 changed files with 6 additions and 7 deletions

View file

@ -285,7 +285,7 @@ nav_ship(struct shpstr *sp)
cp = BestShipPath(buf, sp->shp_x, sp->shp_y,
sp->shp_destx[0], sp->shp_desty[0],
sp->shp_own);
if (cp == 0 || (*cp == '\0') || (*cp == '?')) {
if (cp == 0) {
wu(0, cnum,
"%s bad path, ship put on standby\n", prship(sp));
sp->shp_autonav |= AN_STANDBY;