]> git.pond.sub.org Git - empserver/commitdiff
Don't let planes on trading block intercept or interdict
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 16 Apr 2011 19:00:27 +0000 (21:00 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 17 Apr 2011 15:45:50 +0000 (17:45 +0200)
Fighters, SAMs, ABMs and anti-sats could intercept, and tactical
missiles could interdict ships or land units.

Missed when the other missions were fixed in v4.2.7.

src/lib/subs/aircombat.c
src/lib/subs/mslsub.c

index 93f5f3f6383491b8bbb098dd8640debad0318d3b..4ae807c6ecdee78b4c8894c571e8c974b64af682 100644 (file)
@@ -778,6 +778,10 @@ getilists(struct emp_qelem *list, unsigned char *rel, natid intruder)
            continue;
        if (plane.pln_effic < 40)
            continue;
+       if (opt_MARKET) {
+           if (ontradingblock(EF_PLANE, &plane))
+               continue;
+       }
        if (!pln_airbase_ok(&plane, 0, 0))
            continue;
        /* got one! */
index db7afb5a81871a118417c9999d0333575134bd0b..2a3dff0fa4e0a4f91939e8e9ea09efb940ea3acf 100644 (file)
@@ -207,6 +207,10 @@ msl_sel(struct emp_qelem *list, coord x, coord y, natid victim,
            continue;
        if (plane.pln_effic < 100)
            continue;
+       if (opt_MARKET) {
+           if (ontradingblock(EF_PLANE, &plane))
+               continue;
+       }
        if (!pln_airbase_ok(&plane, 1, 0))
            continue;
        /* got a valid interceptor */