]> git.pond.sub.org Git - empserver/commitdiff
Fix interdiction to obey op-area for missiles hvy-metal-2.9
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 25 Jul 2008 12:40:01 +0000 (08:40 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 25 Jul 2008 12:43:04 +0000 (08:43 -0400)
Never worked correctly.  Reported by Gregory E. Garland.
(cherry picked from commit 3eb58312b32ebb5e056679eb68e11749b61b72cc)

src/lib/subs/mslsub.c

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