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.
This commit is contained in:
Markus Armbruster 2009-10-04 14:54:39 -04:00
parent 61233e47e8
commit 0100402e5f

View 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;
}