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);
maxy = y + 1;
do {
- if (++routelen == MAXROUTE)
- return "?";
+ if (++routelen == MAXROUTE - 1)
+ return NULL;
markedsectors = 0;
for (scanx = minx; scanx <= maxx; scanx++) {
x = XNORM(scanx);
}
}
if (tx == ex && ty == ey) {
- bpath[routelen] = 0;
+ bpath[routelen] = 'h';
+ bpath[routelen + 1] = 0;
while (routelen--) {
i = ((mapindex[tx][ty]) >> 13) - 1;
bpath[routelen] = dirchar[i];
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;