]> git.pond.sub.org Git - empserver/commitdiff
Don't permit nukes on satellites, ABMs and SAMs
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 4 Oct 2009 18:54:39 +0000 (14:54 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 12 Dec 2009 15:28:52 +0000 (16:28 +0100)
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

index 33481dcc659ad623f5243b0f03a15db26119c39e..a7ed90b934cb576d3ea9c064dbfa682a4bb7f019 100644 (file)
@@ -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;
        }