diff --git a/include/unit.h b/include/unit.h index 65f16c6d..b544d7f9 100644 --- a/include/unit.h +++ b/include/unit.h @@ -58,7 +58,7 @@ extern void unit_onresize(int); extern char *unit_nameof(struct empobj *); extern void unit_list(struct emp_qelem *); -extern char *unit_path(int, struct empobj *, char *, size_t); +extern char *unit_path(struct empobj *, char *, size_t); extern void unit_view(struct emp_qelem *); extern void unit_teleport(struct empobj *, coord, coord); extern int unit_update_cargo(struct empobj *); diff --git a/src/lib/commands/navi.c b/src/lib/commands/navi.c index 4773424b..db2b99f9 100644 --- a/src/lib/commands/navi.c +++ b/src/lib/commands/navi.c @@ -87,7 +87,7 @@ do_unit_move(struct emp_qelem *ulist, double *minmob, double *maxmob) if (player->argp[2]) { strcpy(buf, player->argp[2]); - cp = unit_path(1, leader, buf, sizeof(buf)); + cp = unit_path(leader, buf, sizeof(buf)); } while (!QEMPTY(ulist)) { @@ -138,7 +138,7 @@ do_unit_move(struct emp_qelem *ulist, double *minmob, double *maxmob) continue; } if (cp) - cp = unit_path(1, leader, buf, sizeof(buf)); + cp = unit_path(leader, buf, sizeof(buf)); } if (type == EF_SHIP) { rad_map_set(player->cnum, leader->x, leader->y, leader->effic, diff --git a/src/lib/subs/unitsub.c b/src/lib/subs/unitsub.c index b8916037..8dfac456 100644 --- a/src/lib/subs/unitsub.c +++ b/src/lib/subs/unitsub.c @@ -117,7 +117,7 @@ unit_list(struct emp_qelem *unit_list) } char * -unit_path(int together, struct empobj *unit, char *buf, size_t bufsz) +unit_path(struct empobj *unit, char *buf, size_t bufsz) { coord destx; coord desty; @@ -131,10 +131,6 @@ unit_path(int together, struct empobj *unit, char *buf, size_t bufsz) if (!sarg_xy(buf, &destx, &desty)) return buf; - if (!together) { - pr("Cannot go to a destination sector if not all starting in the same sector\n"); - return NULL; - } if (unit->ef_type == EF_SHIP) { c = path_find(unit->x, unit->y, destx, desty, player->cnum, MOB_SAIL);