X-Git-Url: http://git.pond.sub.org/?p=empserver;a=blobdiff_plain;f=src%2Flib%2Fcommands%2Farm.c;h=4bbfe74201c0b6efc92f36d8f9c5075b5f083ca3;hp=d412c642a4882c3eafc36d56f9793781b2e7bad5;hb=c347db0551be0d96f18d245e16e820ad2c87f67f;hpb=0b46e31d60f5b60f4dfca7df60574264f6713a3b diff --git a/src/lib/commands/arm.c b/src/lib/commands/arm.c index d412c642a..4bbfe7420 100644 --- a/src/lib/commands/arm.c +++ b/src/lib/commands/arm.c @@ -30,7 +30,7 @@ * Dave Pare, 1986 * Ken Stevens, 1995 * Steve McClure, 2000 - * Markus Armbruster, 2006-2011 + * Markus Armbruster, 2006-2018 */ #include @@ -61,11 +61,13 @@ arm(void) && relations_with(pl.pln_own, player->cnum) != ALLIED) continue; plc = &plchr[(int)pl.pln_type]; - if ((plc->pl_flags & (P_O | P_N | P_MAR)) - || (plc->pl_flags & (P_M | P_F)) == (P_M | P_F)) { + if (!(plc->pl_flags & (P_B | P_T | P_C)) + || (plc->pl_flags & P_MAR)) { pr("A %s cannot carry nuclear devices!\n", plc->pl_name); return RET_FAIL; } + if (CANT_HAPPEN(pl.pln_flags & PLN_LAUNCHED)) + continue; if (opt_MARKET) { if (ontradingblock(EF_PLANE, &pl)) { pr("You cannot arm %s while it is on the trading block!\n", @@ -145,6 +147,8 @@ disarm(void) continue; if (!getnuke(nuk_on_plane(&pl), &nuke)) continue; + if (CANT_HAPPEN(pl.pln_flags & PLN_LAUNCHED)) + continue; if (opt_MARKET) { if (ontradingblock(EF_PLANE, &pl)) { pr("You cannot disarm %s while it is on the trading block!\n",