]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/move.c
Move declarations for chance.c to new chance.h
[empserver] / src / lib / subs / move.c
index 748548edb1d521c15646b94dc9037bebd2f14977..61fd3a4102d51e5555336ac9cd17022bc0e450e0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2013, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -33,6 +33,7 @@
 #include <config.h>
 
 #include <ctype.h>
+#include "chance.h"
 #include "damage.h"
 #include "file.h"
 #include "map.h"
@@ -64,7 +65,6 @@ move_ground(struct sctstr *start, struct sctstr *end,
     int dir;
     char scanspace[1024];
     char *argp[128];
-    int ac;
     int intcost;
     int takedam = *dam;
     int out = 0;
@@ -172,11 +172,12 @@ move_ground(struct sctstr *start, struct sctstr *end,
            continue;
        }
        if (dir == DIR_MAP) {
-           ac = parse(movstr, scanspace, argp, NULL, NULL, NULL);
-           if (ac == 1) {
+           parse(movstr, scanspace, argp, NULL, NULL, NULL);
+           if (argp[0][1]) {
                pr("Use of '%c' without a space before its argument is deprecated.\n"
                   "Support for it will go away in a future release\n",
                   *movstr);
+               argp[2] = argp[1];
                argp[1] = argp[0] + 1;
            }
            if (!exploring)