From 0100402e5ff422fca4eac835304e06e5e6c3aec4 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 4 Oct 2009 14:54:39 -0400 Subject: [PATCH] Don't permit nukes on satellites, ABMs and SAMs Before, satellites could be disarmed and armed even in orbit. Nukes on satellites went along into orbit, where they did nothing in particular. Nukes on ABMs and SAMs were lost without effect when their missile intercepted. The stock game is not affected, because its satellites, ABMs and SAMs all have zero load. --- src/lib/commands/arm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/commands/arm.c b/src/lib/commands/arm.c index 33481dcc..a7ed90b9 100644 --- a/src/lib/commands/arm.c +++ b/src/lib/commands/arm.c @@ -62,7 +62,8 @@ arm(void) && getrel(getnatp(pl.pln_own), player->cnum) != ALLIED) continue; plc = &plchr[(int)pl.pln_type]; - if ((plc->pl_flags & (P_O | P_M)) == (P_O | P_M)) { + if ((plc->pl_flags & (P_O | P_N)) + || (plc->pl_flags & (P_M | P_F)) == (P_M | P_F)) { pr("A %s cannot carry nuclear devices!\n", plc->pl_name); return RET_FAIL; }