(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:
parent
9c27a771b3
commit
abb9ae2338
3 changed files with 6 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue