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.
This commit is contained in:
Markus Armbruster 2012-04-29 09:58:51 +02:00
parent 4aaea42a83
commit eed7a46aed

View file

@ -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;