]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/path.c
Update copyright notice
[empserver] / src / lib / commands / path.c
index 61818ee76d69b26fda6e345e0cc1926cca534b8a..b0b0d208369cc9d6396486af734f01c4f820e44c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
 
 #include <config.h>
 
-#include "misc.h"
-#include "player.h"
-#include "xy.h"
-#include "nsc.h"
-#include "nat.h"
-#include "file.h"
-#include "sect.h"
-#include "path.h"
-#include "map.h"
 #include "commands.h"
+#include "map.h"
 #include "optlist.h"
+#include "path.h"
 
 int
 path(void)
@@ -74,7 +67,7 @@ path(void)
        return RET_FAIL;
     }
     getsect(sect.sct_dist_x, sect.sct_dist_y, &dsect);
-    pp = BestDistPath(buf, &sect, &dsect, &move_cost, MOB_ROAD);
+    pp = BestDistPath(buf, &sect, &dsect, &move_cost);
     if (!pp) {
        pr("No path possible from %s to distribution sector %s\n",
           xyas(sect.sct_x, sect.sct_y, player->cnum),
@@ -84,7 +77,7 @@ path(void)
     if (!mapbuf)
        mapbuf = malloc(WORLD_Y * MAPWIDTH(3));
     if (!map) {
-       map = malloc(WORLD_Y * sizeof(s_char *));
+       map = malloc(WORLD_Y * sizeof(char *));
        if (map && mapbuf) {
            for (i = 0; i < WORLD_Y; i++)
                map[i] = &mapbuf[MAPWIDTH(3) * i];
@@ -112,7 +105,6 @@ path(void)
               3);
        cx += diroff[i][0];
        cy += diroff[i][1];
-       ++pp;
     }
     border(&relrange, "     ", " ");
     while (nxtsct(&ns, &sect)) {