navigate march: Drop do_unit_move() parameter together
It's always non-zero now. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
a024dbb8a3
commit
6502ac2a8f
3 changed files with 6 additions and 9 deletions
|
@ -60,7 +60,7 @@ extern int load_comm_ok(struct sctstr *, natid, i_type, int);
|
||||||
extern void gift(natid, natid, void *, char *);
|
extern void gift(natid, natid, void *, char *);
|
||||||
extern int display_mark(i_type, int);
|
extern int display_mark(i_type, int);
|
||||||
extern int nav_map(int, int, 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 count_pop(int);
|
||||||
extern int line_of_sight(char **rad, int ax, int ay, int bx, int by);
|
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 **);
|
extern void plane_sona(struct emp_qelem *, int, int, struct shiplist **);
|
||||||
|
|
|
@ -44,7 +44,6 @@ march(void)
|
||||||
struct nstr_item ni_land;
|
struct nstr_item ni_land;
|
||||||
struct emp_qelem land_list;
|
struct emp_qelem land_list;
|
||||||
double minmob, maxmob;
|
double minmob, maxmob;
|
||||||
int together = 1;
|
|
||||||
|
|
||||||
if (!snxtitem(&ni_land, EF_LAND, player->argp[1], NULL))
|
if (!snxtitem(&ni_land, EF_LAND, player->argp[1], NULL))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
@ -54,5 +53,5 @@ march(void)
|
||||||
pr("No lands\n");
|
pr("No lands\n");
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
return do_unit_move(&land_list, &together, &minmob, &maxmob);
|
return do_unit_move(&land_list, &minmob, &maxmob);
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,6 @@ navi(void)
|
||||||
struct nstr_item ni_ship;
|
struct nstr_item ni_ship;
|
||||||
struct emp_qelem ship_list;
|
struct emp_qelem ship_list;
|
||||||
double minmob, maxmob;
|
double minmob, maxmob;
|
||||||
int together = 1;
|
|
||||||
|
|
||||||
if (!snxtitem(&ni_ship, EF_SHIP, player->argp[1], NULL))
|
if (!snxtitem(&ni_ship, EF_SHIP, player->argp[1], NULL))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
@ -60,12 +59,11 @@ navi(void)
|
||||||
pr("No ships\n");
|
pr("No ships\n");
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
return do_unit_move(&ship_list, &together, &minmob, &maxmob);
|
return do_unit_move(&ship_list, &minmob, &maxmob);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
do_unit_move(struct emp_qelem *ulist, int *together,
|
do_unit_move(struct emp_qelem *ulist, double *minmob, double *maxmob)
|
||||||
double *minmob, double *maxmob)
|
|
||||||
{
|
{
|
||||||
char *cp = NULL;
|
char *cp = NULL;
|
||||||
int leader_uid;
|
int leader_uid;
|
||||||
|
@ -89,7 +87,7 @@ do_unit_move(struct emp_qelem *ulist, int *together,
|
||||||
|
|
||||||
if (player->argp[2]) {
|
if (player->argp[2]) {
|
||||||
strcpy(buf, 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)) {
|
while (!QEMPTY(ulist)) {
|
||||||
|
@ -140,7 +138,7 @@ do_unit_move(struct emp_qelem *ulist, int *together,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (cp)
|
if (cp)
|
||||||
cp = unit_path(*together, leader, buf, sizeof(buf));
|
cp = unit_path(1, 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,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue