(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

@ -474,12 +474,10 @@ sorde(void)
c = BestShipPath(buf, ship.shp_x,
ship.shp_y, ship.shp_destx[0],
ship.shp_desty[0], ship.shp_own);
if (!c || !*c)
if (!c)
pr(" no route possible");
else if (*c == 'h')
pr(" has arrived");
else if (*c == '?')
pr(" route too long");
else {
/* distance to destination */
eta_calc(&ship, c, &len, &updates);