]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/miss.c
Update copyright notice
[empserver] / src / lib / commands / miss.c
index 16d60b2fe1466703fc64e23ae2b5e55d676b78f0..7140ae2610ca35e9ed539ca478e245d1baa8941c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -30,7 +30,7 @@
  *  Known contributors to this file:
  *     Thomas Ruschak, 1992
  *     Steve McClure, 2000
- *     Markus Armbruster, 2005-2008
+ *     Markus Armbruster, 2005-2009
  */
 
 #include <config.h>
@@ -64,7 +64,7 @@ mission(void)
 
     p = getstarg(player->argp[1], "Ship, plane or land unit (p,sh,la)? ",
                 buf);
-    if (p == 0)
+    if (!p)
        return RET_SYN;
     type = ef_byname_from(p, ef_with_missions);
     if (type < 0) {
@@ -77,7 +77,7 @@ mission(void)
     p = getstarg(player->argp[3],
                 "Mission (int, sup, osup, dsup, esc, res, air, query, clear)? ",
                 buf);
-    if (p == 0)
+    if (!p)
        return RET_SYN;
 
 /*
@@ -246,6 +246,12 @@ mission(void)
            }
        }
 
+       if (type == EF_PLANE && nuk_on_plane((struct plnstr *)gp) >= 0) {
+           pr("%s can't perform a mission while it carries a nuclear weapon",
+              obj_nameof(gp));
+           continue;
+       }
+
        if (*p == '.') {
            x = gp->x;
            y = gp->y;