Check pln_airbase_ok() in msl_sel()

The lack of base checking there permitted ship and land unit missile
interdiction and ballistic missile interception without a proper base.
This commit is contained in:
Markus Armbruster 2008-03-24 17:35:23 +01:00
parent 52b303498e
commit d5c9cfec28

View file

@ -200,6 +200,8 @@ msl_sel(struct emp_qelem *list, coord x, coord y, natid victim,
continue; continue;
if (plane.pln_effic < 100) if (plane.pln_effic < 100)
continue; continue;
if (!pln_airbase_ok(&plane, 1, 0))
continue;
/* got a valid interceptor */ /* got a valid interceptor */
irv = malloc(sizeof(*irv)); irv = malloc(sizeof(*irv));
irv->bombs = 0; irv->bombs = 0;