subs: Drop unit_path() parameter together

It's always non-zero now.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2014-12-28 22:36:25 +01:00
parent 6502ac2a8f
commit 4bc51f75f8
3 changed files with 4 additions and 8 deletions

View file

@ -58,7 +58,7 @@ extern void unit_onresize(int);
extern char *unit_nameof(struct empobj *); extern char *unit_nameof(struct empobj *);
extern void unit_list(struct emp_qelem *); 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_view(struct emp_qelem *);
extern void unit_teleport(struct empobj *, coord, coord); extern void unit_teleport(struct empobj *, coord, coord);
extern int unit_update_cargo(struct empobj *); extern int unit_update_cargo(struct empobj *);

View file

@ -87,7 +87,7 @@ do_unit_move(struct emp_qelem *ulist, double *minmob, double *maxmob)
if (player->argp[2]) { if (player->argp[2]) {
strcpy(buf, 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)) { while (!QEMPTY(ulist)) {
@ -138,7 +138,7 @@ do_unit_move(struct emp_qelem *ulist, double *minmob, double *maxmob)
continue; continue;
} }
if (cp) if (cp)
cp = unit_path(1, leader, buf, sizeof(buf)); cp = unit_path(leader, buf, sizeof(buf));
} }
if (type == EF_SHIP) { if (type == EF_SHIP) {
rad_map_set(player->cnum, leader->x, leader->y, leader->effic, rad_map_set(player->cnum, leader->x, leader->y, leader->effic,

View file

@ -117,7 +117,7 @@ unit_list(struct emp_qelem *unit_list)
} }
char * 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 destx;
coord desty; coord desty;
@ -131,10 +131,6 @@ unit_path(int together, struct empobj *unit, char *buf, size_t bufsz)
if (!sarg_xy(buf, &destx, &desty)) if (!sarg_xy(buf, &destx, &desty))
return buf; 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) { if (unit->ef_type == EF_SHIP) {
c = path_find(unit->x, unit->y, destx, desty, c = path_find(unit->x, unit->y, destx, desty,
player->cnum, MOB_SAIL); player->cnum, MOB_SAIL);