]> git.pond.sub.org Git - empserver/commitdiff
(arm): Prevent a nuke from being on two planes at the same time.
authorRon Koenderink <rkoenderink@yahoo.ca>
Tue, 2 Jan 2007 23:57:40 +0000 (23:57 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Tue, 2 Jan 2007 23:57:40 +0000 (23:57 +0000)
Closes #1602998.

src/lib/commands/arm.c

index eeb49d0ab5ec28b4c7faf623e06c34a10466f19d..b2975fa070f141d17b849e9200a735342d24944d 100644 (file)
@@ -99,6 +99,12 @@ arm(void)
        if (!check_plane_ok(&pl) || !check_nuke_ok(&nuke))
            return RET_FAIL;
 
+       if (nuke.nuk_plane >= 0 && nuke.nuk_plane != pl.pln_uid) {
+           pr("%s is already armed on plane #%d!\n",
+              prnuke(&nuke), nuke.nuk_plane);
+           return RET_FAIL;
+       }
+
        if (p && (*p == 'y' || *p == 'Y'))
            pl.pln_flags |= PLN_AIRBURST;
        else