]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/para.c
commands: Rename the command functions
[empserver] / src / lib / commands / para.c
index da5ac9acdc29698605d46b28f7b05969486093a7..2e676bd636db4fc0c48f432b9ee5c020b94951fb 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
@@ -44,7 +44,7 @@
 static int paradrop(struct emp_qelem *list, coord x, coord y);
 
 int
-para(void)
+c_paradrop(void)
 {
     coord tx, ty;
     coord ax, ay;
@@ -64,8 +64,7 @@ para(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;
@@ -73,8 +72,6 @@ para(void)
     getsect(tx, ty, &target);
     pr("LZ is %s\n", xyas(tx, ty, player->cnum));
     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);
     if (target.sct_own == player->cnum) {
        pr("You can't air-assault your own sector!\n");
@@ -131,10 +128,8 @@ paradrop(struct emp_qelem *list, coord x, coord y)
     if (att_abort(A_PARA, NULL, def))
        return RET_FAIL;
 
-    /* Show what we're air-assaulting, and check treaties */
-
-    if (att_show(def))
-       return RET_FAIL;
+    /* Show what we're air-assaulting */
+    att_show(def);
 
     /* set what we're air-assaulting with */