From: Markus Armbruster Date: Sun, 29 Apr 2012 07:58:51 +0000 (+0200) Subject: Fix arm to require nuke and plane to be in the same sector X-Git-Tag: v4.3.30~12 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=eed7a46aeddac874190afc76c9831247ce3db007 Fix arm to require nuke and plane to be in the same sector It happily arms a plane with a remote nuke. The nuke gets teleported to the plane when the plane moves (a two-way sortie doesn't count as move). Broken in 4.3.3. Reported by Harald Katzer. --- diff --git a/src/lib/commands/arm.c b/src/lib/commands/arm.c index 61ccc2ef5..f7268dd09 100644 --- a/src/lib/commands/arm.c +++ b/src/lib/commands/arm.c @@ -102,6 +102,11 @@ arm(void) prnuke(&nuke), nuke.nuk_plane); return RET_FAIL; } + if (nuke.nuk_x != pl.pln_x || nuke.nuk_y != pl.pln_y) { + pr("%s isn't in the same sector as %s!\n", + prnuke(&nuke), prplane(&pl)); + return RET_FAIL; + } if (*p == 'y' || *p == 'Y') pl.pln_flags |= PLN_AIRBURST;