]> git.pond.sub.org Git - empserver/commitdiff
navigate march: Drop do_unit_move() parameter together
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 28 Dec 2014 21:32:23 +0000 (22:32 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 28 Feb 2015 15:13:14 +0000 (16:13 +0100)
It's always non-zero now.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
include/prototypes.h
src/lib/commands/marc.c
src/lib/commands/navi.c

index 729c561eabf8bf362c22c86aeafbaede4af32e83..7d8be00744809a18eba6be9fe29ecbc6ddaca4a8 100644 (file)
@@ -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 **);
index 951aedaf9eab018b918ed7192648dbddddcae583..f569a476c13899ef77cbcbfa0e65f4c6277df35b 100644 (file)
@@ -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);
 }
index e305193830d5aa5e1b44f09c3e7bf3a12b63864c..4773424b9493ec5ce16e61cd9e3149ea7f228959 100644 (file)
@@ -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,