/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2008, 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
* Known contributors to this file:
* Thomas Ruschak, 1992
* Steve McClure, 2000
+ * Markus Armbruster, 2005-2009
*/
#include <config.h>
struct nstr_item ni;
char buf[1024];
- if ((p =
- getstarg(player->argp[1], "Ship, plane or land unit (p,sh,la)? ",
- buf)) == 0)
+ p = getstarg(player->argp[1], "Ship, plane or land unit (p,sh,la)? ",
+ buf);
+ if (!p)
return RET_SYN;
type = ef_byname_from(p, ef_with_missions);
if (type < 0) {
if (!snxtitem(&ni, type, player->argp[2], NULL))
return RET_SYN;
- if ((p =
- getstarg(player->argp[3],
- "Mission (int, sup, osup, dsup, esc, res, air, query, clear)? ",
- buf)) == 0)
+ p = getstarg(player->argp[3],
+ "Mission (int, sup, osup, dsup, esc, res, air, query, clear)? ",
+ buf);
+ if (!p)
return RET_SYN;
/*
return RET_FAIL;
}
- if ((p = getstarg(player->argp[4], "operations point? ", buf)) == 0
- || *p == 0)
+ p = getstarg(player->argp[4], "operations point? ", buf);
+ if (!p || !*p)
return RET_SYN;
if (*p != '.') {
}
}
+ 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;