]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/unitsub.c
Collect path-related stuff in path.h
[empserver] / src / lib / subs / unitsub.c
index ea5756821951251644e315f100cada95df8a1380..fa986c0675fb3a31ce34dd4cac421486c3aca0c6 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "empobj.h"
 #include "file.h"
+#include "path.h"
 #include "player.h"
 #include "optlist.h"
 #include "prototypes.h"
@@ -63,7 +64,7 @@ unit_list(struct emp_qelem *unit_list)
     if (type == EF_LAND)
        pr("lnd#     land type       x,y    a  eff  sh gun xl  mu tech retr\n");
     else
-        pr("shp#     ship type       x,y   fl  eff mil  sh gun pn he xl ln mob tech\n");
+       pr("shp#     ship type       x,y   fl  eff mil  sh gun pn he xl ln mob tech\n");
 
     for (; qp != unit_list; qp = next) {
        next = qp->q_back;
@@ -75,7 +76,7 @@ unit_list(struct emp_qelem *unit_list)
            continue;
        pr("%4d ", unit->uid);
        pr("%-16.16s ", empobj_chr_name(unit));
-       prxy("%4d,%-4d ", unit->x, unit->y, unit->own);
+       prxy("%4d,%-4d ", unit->x, unit->y);
        pr("%1.1s", &unit->group);
        pr("%4d%%", unit->effic);
        if (type == EF_LAND) {
@@ -116,7 +117,7 @@ unit_put(struct emp_qelem *list, natid actor)
            continue;
        if (actor) {
            mpr(actor, "%s stopped at %s\n", obj_nameof(unit),
-               xyas(unit->x, unit->y, unit->own));
+               xyas(unit->x, unit->y, actor));
            if (unit->ef_type == EF_LAND) {
                if (ulp->mobil < -127)
                    ulp->mobil = -127;
@@ -161,7 +162,7 @@ unit_path(int together, struct empobj *unit, char *buf)
                          d_sect.sct_x, d_sect.sct_y, player->cnum);
        if (!cp || unit->mobil <= 0) {
            pr("Can't get to '%s' right now.\n",
-               xyas(d_sect.sct_x, d_sect.sct_y, player->cnum));
+              xyas(d_sect.sct_x, d_sect.sct_y, player->cnum));
            return NULL;
        }
     } else {
@@ -201,8 +202,8 @@ unit_view(struct emp_qelem *list)
                pr("[oil:%d] ", sect.sct_oil);
        }
        pr("%s @ %s %d%% %s\n", obj_nameof(&ulp->unit.gen),
-           xyas(ulp->unit.gen.x, ulp->unit.gen.y, player->cnum),
-           sect.sct_effic, dchr[sect.sct_type].d_name);
+          xyas(ulp->unit.gen.x, ulp->unit.gen.y, player->cnum),
+          sect.sct_effic, dchr[sect.sct_type].d_name);
     }
 }