* ---
*
* sail.c: Set sail path for leaders
- *
+ *
* Known contributors to this file:
* Robert Forsman
*/
struct shpstr ship;
char navpath[MAX_PATH_LEN];
- while (!player->aborted && nxtitem(nstr, &ship)) {
+ while (nxtitem(nstr, &ship)) {
if (!player->owner || ship.shp_own == 0)
continue;
if ((ship.shp_autonav & AN_AUTONAV) &&
xyas(ship.shp_x, ship.shp_y, ship.shp_own));
cp = getpath(navpath, player->argp[2],
ship.shp_x, ship.shp_y, 0, 0, P_SAILING);
+ if (!cp)
+ return RET_FAIL;
if (!check_ship_ok(&ship))
continue;
- if (!player->aborted) {
- strncpy(ship.shp_path, cp, sizeof(ship.shp_path) - 2);
- ship.shp_mission = 0;
- putship(ship.shp_uid, &ship);
- }
+ strncpy(ship.shp_path, cp, sizeof(ship.shp_path) - 2);
+ ship.shp_mission = 0;
+ putship(ship.shp_uid, &ship);
}
return RET_OK;
}
pr("The SAIL option is not enabled, so this command is not valid.\n");
return RET_FAIL;
}
- if (!snxtitem(&nstr, EF_SHIP, player->argp[1]))
+ if (!snxtitem(&nstr, EF_SHIP, player->argp[1], NULL))
return RET_SYN;
cp = player->argp[2];
if (*player->argp[0] == 'u' || (cp && !strcmp(cp, "-")))