(arm): Prevent a nuke from being on two planes at the same time.
Closes #1602998.
This commit is contained in:
parent
14ad5f1276
commit
67027e22d1
1 changed files with 6 additions and 0 deletions
|
@ -99,6 +99,12 @@ arm(void)
|
||||||
if (!check_plane_ok(&pl) || !check_nuke_ok(&nuke))
|
if (!check_plane_ok(&pl) || !check_nuke_ok(&nuke))
|
||||||
return RET_FAIL;
|
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'))
|
if (p && (*p == 'y' || *p == 'Y'))
|
||||||
pl.pln_flags |= PLN_AIRBURST;
|
pl.pln_flags |= PLN_AIRBURST;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue