]> git.pond.sub.org Git - empserver/commitdiff
Move "Releasing RV's" message into detonate()
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 5 Oct 2009 11:25:45 +0000 (07:25 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 13 Dec 2009 07:03:49 +0000 (08:03 +0100)
src/lib/commands/bomb.c
src/lib/commands/laun.c
src/lib/subs/detonate.c

index 215897366cc8f240dbcc3fee89aa513217920836..38f71d2c8e50ce12ff1e52e762f135f018f58831 100644 (file)
@@ -781,14 +781,10 @@ strat_bomb(struct emp_qelem *list, struct sctstr *target)
 
     for (qp = list->q_forw; qp != list; qp = qp->q_forw) {
        plp = (struct plist *)qp;
-       if (getnuke(nuk_on_plane(&plp->plane), &nuke)) {
-           mpr(plp->plane.pln_own,
-               "Releasing RV's for %s detonation...\n",
-               plp->plane.pln_flags & PLN_AIRBURST
-               ? "airburst" : "groundburst");
+       if (getnuke(nuk_on_plane(&plp->plane), &nuke))
            detonate(&nuke, target->sct_x, target->sct_y,
                     plp->plane.pln_flags & PLN_AIRBURST);
-       else
+       else
            dam += pln_damage(&plp->plane, 's', 1);
     }
     if (dam <= 0)              /* dam == 0 if only nukes were delivered */
index 1ea560903f4d181c508f2c63c9e17ae9cc106400..801c61a53b4b8e76c47655644d3744b5f0472c5b 100644 (file)
@@ -260,12 +260,9 @@ launch_missile(struct plnstr *pp, int sublaunch)
 #endif
            return RET_OK;
        }
-       if (getnuke(nuk_on_plane(pp), &nuke)) {
-           mpr(pp->pln_own,
-               "Releasing RV's for %s detonation...\n",
-               pp->pln_flags & PLN_AIRBURST ? "airburst" : "groundburst");
+       if (getnuke(nuk_on_plane(pp), &nuke))
            detonate(&nuke, sx, sy, pp->pln_flags & PLN_AIRBURST);
-       else {
+       else {
            dam = pln_damage(pp, 's', 1);
            pr("did %d damage in %s\n", PERCENT_DAMAGE(dam),
               xyas(sx, sy, player->cnum));
index b6c695526a64bf56c9d54dec9de5c1352f8d45f2..736c1f1cb447a3818ac7f733732e7c06bab25334 100644 (file)
@@ -74,6 +74,9 @@ detonate(struct nukstr *np, coord x, coord y, int airburst)
     struct nstr_item ni;
     int issea;
 
+    mpr(bombown, "Releasing RV's for %s detonation...\n",
+       airburst ? "airburst" : "groundburst");
+
     getsect(x, y, &sect);
     issea = sect.sct_type == SCT_WATER;
     ncp = &nchr[nuketype];