]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/laun.c
Update copyright notice
[empserver] / src / lib / commands / laun.c
index 50674552255b6a57233681a497d3a2083294c540..5d9e73962e704a5a72ad8d4a65751056399e2d7a 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 "sect.h"
-#include "plane.h"
-#include "news.h"
+#include "commands.h"
+#include "damage.h"
 #include "mission.h"
-#include "ship.h"
-#include "nsc.h"
-#include "nat.h"
-#include "path.h"
-#include "file.h"
+#include "news.h"
 #include "optlist.h"
-#include "damage.h"
-#include "commands.h"
+#include "path.h"
+#include "plane.h"
+#include "ship.h"
 
 static int launch_as(struct plnstr *pp);
 static int launch_missile(struct plnstr *pp, int sublaunch);
@@ -107,9 +100,7 @@ laun(void)
            if (!ship.shp_own) {
                pr("%s: ship #%d was sunk!\n",
                   prplane(&plane), ship.shp_uid);
-               makelost(EF_PLANE, plane.pln_own, plane.pln_uid,
-                        plane.pln_x, plane.pln_y);
-               plane.pln_own = 0;
+               plane.pln_effic = 0;
                putplane(plane.pln_uid, &plane);
                continue;
            }
@@ -118,9 +109,7 @@ laun(void)
            if (ship.shp_own != player->cnum && rel != ALLIED) {
                pr("%s: you or an ally do not own ship #%d\n",
                   prplane(&plane), ship.shp_uid);
-               makelost(EF_PLANE, plane.pln_own, plane.pln_uid,
-                        plane.pln_x, plane.pln_y);
-               plane.pln_own = 0;
+               plane.pln_effic = 0;
                putplane(plane.pln_uid, &plane);
                continue;
            }
@@ -159,9 +148,7 @@ laun(void)
        if (retval != RET_OK)
            return retval;
        if (gone) {
-           makelost(EF_PLANE, plane.pln_own, plane.pln_uid, plane.pln_x,
-                    plane.pln_y);
-           plane.pln_own = 0;
+           plane.pln_effic = 0;
            putplane(plane.pln_uid, &plane);
        }
     }
@@ -177,7 +164,7 @@ static int
 launch_as(struct plnstr *pp)
 {
     coord sx, sy;
-    s_char *cp, buf[1024];
+    char *cp, buf[1024];
     struct plnstr plane;
     struct nstr_item ni;
     int goodtarget;
@@ -243,14 +230,14 @@ launch_missile(struct plnstr *pp, int sublaunch)
     struct plchrstr *pcp = plchr + pp->pln_type;
     coord sx, sy;
     int n, dam;
-    s_char *cp;
+    char *cp;
     struct mchrstr *mcp;
     struct shpstr target_ship;
     struct sctstr sect;
     int nukedam;
     int rel;
     struct natstr *natp;
-    s_char buf[1024];
+    char buf[1024];
 
     if (pcp->pl_flags & P_MAR)
        cp = getstarg(player->argp[2], "Target ship? ", buf);
@@ -380,9 +367,9 @@ launch_sat(struct plnstr *pp, int sublaunch)
     int i;
     int dist;
     int dir;
-    s_char *cp;
-    s_char *p;
-    s_char buf[1024];
+    char *cp;
+    char *p;
+    char buf[1024];
 
     pr("\n");
     cp = getstarg(player->argp[2], "Target sector? ", buf);
@@ -410,8 +397,7 @@ launch_sat(struct plnstr *pp, int sublaunch)
     pr("3... 2... 1... Blastoff!!!\n");
     if (chance(0.07 + (100 - pp->pln_effic) / 100.0)) {
        pr("KABOOOOM!  Range safety officer detonates booster!\n");
-       makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x, pp->pln_y);
-       pp->pln_own = 0;
+       pp->pln_effic = 0;
        return RET_OK;
     }
     i = pp->pln_tech + pp->pln_effic;