From 6502ac2a8f7918453549c04bedd0f42d58ecf3b0 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 28 Dec 2014 22:32:23 +0100 Subject: [PATCH] navigate march: Drop do_unit_move() parameter together It's always non-zero now. Signed-off-by: Markus Armbruster --- include/prototypes.h | 2 +- src/lib/commands/marc.c | 3 +-- src/lib/commands/navi.c | 10 ++++------ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/include/prototypes.h b/include/prototypes.h index 729c561ea..7d8be0074 100644 --- a/include/prototypes.h +++ b/include/prototypes.h @@ -60,7 +60,7 @@ extern int load_comm_ok(struct sctstr *, natid, i_type, int); extern void gift(natid, natid, void *, char *); extern int display_mark(i_type, int); extern int nav_map(int, int, int); -extern int do_unit_move(struct emp_qelem *, int *, double *, double *); +extern int do_unit_move(struct emp_qelem *, double *, double *); extern int count_pop(int); extern int line_of_sight(char **rad, int ax, int ay, int bx, int by); extern void plane_sona(struct emp_qelem *, int, int, struct shiplist **); diff --git a/src/lib/commands/marc.c b/src/lib/commands/marc.c index 951aedaf9..f569a476c 100644 --- a/src/lib/commands/marc.c +++ b/src/lib/commands/marc.c @@ -44,7 +44,6 @@ march(void) struct nstr_item ni_land; struct emp_qelem land_list; double minmob, maxmob; - int together = 1; if (!snxtitem(&ni_land, EF_LAND, player->argp[1], NULL)) return RET_SYN; @@ -54,5 +53,5 @@ march(void) pr("No lands\n"); return RET_FAIL; } - return do_unit_move(&land_list, &together, &minmob, &maxmob); + return do_unit_move(&land_list, &minmob, &maxmob); } diff --git a/src/lib/commands/navi.c b/src/lib/commands/navi.c index e30519383..4773424b9 100644 --- a/src/lib/commands/navi.c +++ b/src/lib/commands/navi.c @@ -50,7 +50,6 @@ navi(void) struct nstr_item ni_ship; struct emp_qelem ship_list; double minmob, maxmob; - int together = 1; if (!snxtitem(&ni_ship, EF_SHIP, player->argp[1], NULL)) return RET_SYN; @@ -60,12 +59,11 @@ navi(void) pr("No ships\n"); return RET_FAIL; } - return do_unit_move(&ship_list, &together, &minmob, &maxmob); + return do_unit_move(&ship_list, &minmob, &maxmob); } int -do_unit_move(struct emp_qelem *ulist, int *together, - double *minmob, double *maxmob) +do_unit_move(struct emp_qelem *ulist, double *minmob, double *maxmob) { char *cp = NULL; int leader_uid; @@ -89,7 +87,7 @@ do_unit_move(struct emp_qelem *ulist, int *together, if (player->argp[2]) { strcpy(buf, player->argp[2]); - cp = unit_path(*together, leader, buf, sizeof(buf)); + cp = unit_path(1, leader, buf, sizeof(buf)); } while (!QEMPTY(ulist)) { @@ -140,7 +138,7 @@ do_unit_move(struct emp_qelem *ulist, int *together, continue; } if (cp) - cp = unit_path(*together, leader, buf, sizeof(buf)); + cp = unit_path(1, leader, buf, sizeof(buf)); } if (type == EF_SHIP) { rad_map_set(player->cnum, leader->x, leader->y, leader->effic, -- 2.43.0