(arm): Prevent a nuke from being on two planes at the same time.

Closes #1602998.
This commit is contained in:
Ron Koenderink 2007-01-02 23:57:40 +00:00
parent 14ad5f1276
commit 67027e22d1

View 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