Fix interdiction to obey op-area for missiles

Never worked correctly.  Reported by Gregory E. Garland.
This commit is contained in:
Markus Armbruster 2008-07-25 08:40:01 -04:00
parent d72f9936db
commit 3eb58312b3

View file

@ -194,6 +194,9 @@ msl_sel(struct emp_qelem *list, coord x, coord y, natid victim,
continue; continue;
if (mission && plane.pln_mission != mission) if (mission && plane.pln_mission != mission)
continue; continue;
if (mission &&
plane.pln_radius < mapdist(x, y, plane.pln_opx, plane.pln_opy))
continue;
if (getrel(getnatp(plane.pln_own), victim) >= NEUTRAL) if (getrel(getnatp(plane.pln_own), victim) >= NEUTRAL)
continue; continue;
/* missiles go one way, so we can use all the range */ /* missiles go one way, so we can use all the range */