]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/fly.c
commands: Rename the command functions
[empserver] / src / lib / commands / fly.c
index f861b331b2e523c69b4092f4c1f57e3d6bd327a2..4df04bb2fc3640c5c7a368acdf362aa138a841c7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2012, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -41,7 +41,7 @@
 #include "plane.h"
 
 int
-fly(void)
+c_fly(void)
 {
     coord tx, ty;
     coord ax, ay;
@@ -65,8 +65,7 @@ fly(void)
        return RET_SYN;
     ax = ap_sect.sct_x;
     ay = ap_sect.sct_y;
-    if (!getpath(flightpath, player->argp[4], ax, ay, 0, 0, MOB_FLY)
-       || *flightpath == 0)
+    if (!getpath(flightpath, player->argp[4], ax, ay, 0, 0, MOB_FLY))
        return RET_SYN;
     tx = ax;
     ty = ay;
@@ -93,8 +92,6 @@ fly(void)
     }
 
     ap_to_target = strlen(flightpath);
-    if (flightpath[ap_to_target - 1] == 'h')
-       ap_to_target--;
     pr("range to target is %d\n", ap_to_target);
     /*
      * select planes within range