]> git.pond.sub.org Git - empserver/commitdiff
Include destination in interception and plane mission messages
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 27 Aug 2008 01:33:48 +0000 (21:33 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Wed, 27 Aug 2008 01:46:49 +0000 (21:46 -0400)
Interception and missions launch planes automatically.  The plane
owner (and for missions, the base sector owner) gets a message.
Destination coordinates are often obvious from the context, but not
always, e.g. when flying in support of allies, or when the mission
gets interepted and aborts.  Include the destination coordinates in
the messages.  Reported by Ulrich Hannemann.

src/lib/subs/aircombat.c
src/lib/subs/mission.c

index 11616ee916fcc0ee0140783c7982045297710855..3e396c966dde3773be1a3019448bd10b642f8fb9 100644 (file)
@@ -415,8 +415,8 @@ sam_intercept(struct emp_qelem *att_list, struct emp_qelem *def_list,
            if (first) {
                first = 0;
                PR(plane_owner, "%s launches SAMs!\n", cname(def_own));
            if (first) {
                first = 0;
                PR(plane_owner, "%s launches SAMs!\n", cname(def_own));
-               PR(def_own, "Launching SAMs at %s planes!\n",
-                  cname(plane_owner));
+               PR(def_own, "Launching SAMs at %s planes over %s!\n",
+                  cname(plane_owner), xyas(x, y, def_own));
                ac_combat_headers(plane_owner, def_own);
            }
            ac_dog(aplp, dplp);
                ac_combat_headers(plane_owner, def_own);
            }
            ac_dog(aplp, dplp);
@@ -497,8 +497,9 @@ ac_intercept(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
        return;
     PR(plane_owner, "%d %s fighter%s rising to intercept!\n",
        icount, cname(def_own), icount == 1 ? " is" : "s are");
        return;
     PR(plane_owner, "%d %s fighter%s rising to intercept!\n",
        icount, cname(def_own), icount == 1 ? " is" : "s are");
-    PR(def_own, "%d fighter%s intercepting %s planes!\n",
-       icount, icount == 1 ? " is" : "s are", cname(plane_owner));
+    PR(def_own, "%d fighter%s intercepting %s planes over %s!\n",
+       icount, icount == 1 ? " is" : "s are", cname(plane_owner),
+       xyas(x, y, def_own));
     ac_combat_headers(plane_owner, def_own);
     ac_airtoair(esc_list, &int_list);
     ac_airtoair(bomb_list, &int_list);
     ac_combat_headers(plane_owner, def_own);
     ac_airtoair(esc_list, &int_list);
     ac_airtoair(bomb_list, &int_list);
index 54d22a78b9e2b258d4ab5e124a65fd0cd09fdf43..6bacf228d2630d6268170f7e72b729e4246fd51a 100644 (file)
@@ -647,12 +647,15 @@ perform_mission(coord x, coord y, natid victim, struct emp_qelem *list,
        pp = BestAirPath(buf, air->x, air->y, x, y);
        if (CANT_HAPPEN(!pp))
            continue;
        pp = BestAirPath(buf, air->x, air->y, x, y);
        if (CANT_HAPPEN(!pp))
            continue;
-       wu(0, plane_owner, "Flying %s mission from %s\n",
-          mission_name(mission), xyas(air->x, air->y, plane_owner));
+       wu(0, plane_owner, "Flying %s mission from %s to %s\n",
+          mission_name(mission),
+          xyas(air->x, air->y, plane_owner),
+          xyas(x, y, plane_owner));
        if (air->own && (air->own != plane_owner)) {
        if (air->own && (air->own != plane_owner)) {
-           wu(0, air->own, "%s is flying %s mission from %s\n",
+           wu(0, air->own, "%s is flying %s mission from %s to %s\n",
               cname(plane_owner), mission_name(mission),
               cname(plane_owner), mission_name(mission),
-              xyas(air->x, air->y, air->own));
+              xyas(air->x, air->y, air->own),
+              xyas(x, y, air->own));
        }
 
        ac_encounter(&b, &e, air->x, air->y, pp, mission_flags, 0);
        }
 
        ac_encounter(&b, &e, air->x, air->y, pp, mission_flags, 0);
@@ -1369,12 +1372,15 @@ air_defense(coord x, coord y, natid victim, struct emp_qelem *bomb_list,
                pln_put(&i);
                continue;
            }
                pln_put(&i);
                continue;
            }
-           wu(0, cn, "Flying %s mission from %s\n",
-              mission_name(MI_AIR_DEFENSE), xyas(air->x, air->y, cn));
+           wu(0, cn, "Flying %s mission from %s to %s\n",
+              mission_name(MI_AIR_DEFENSE),
+              xyas(air->x, air->y, cn),
+              xyas(x, y, cn));
            if (air->own && (air->own != cn)) {
            if (air->own && (air->own != cn)) {
-               wu(0, air->own, "%s is flying %s mission from %s\n",
+               wu(0, air->own, "%s is flying %s mission from %s to %s\n",
                   cname(cn), mission_name(MI_AIR_DEFENSE),
                   cname(cn), mission_name(MI_AIR_DEFENSE),
-                  xyas(air->x, air->y, air->own));
+                  xyas(air->x, air->y, air->own),
+                  xyas(x, y, air->own));
            }
 
            /* Now, fly the planes to the sector */
            }
 
            /* Now, fly the planes to the sector */