From 42cc4f14e0af2d23bc92c25540b210bca55581d9 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 5 Oct 2009 07:25:45 -0400 Subject: [PATCH] Move "Releasing RV's" message into detonate() --- src/lib/commands/bomb.c | 8 ++------ src/lib/commands/laun.c | 7 ++----- src/lib/subs/detonate.c | 3 +++ 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/lib/commands/bomb.c b/src/lib/commands/bomb.c index 21589736..38f71d2c 100644 --- a/src/lib/commands/bomb.c +++ b/src/lib/commands/bomb.c @@ -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 */ diff --git a/src/lib/commands/laun.c b/src/lib/commands/laun.c index 1ea56090..801c61a5 100644 --- a/src/lib/commands/laun.c +++ b/src/lib/commands/laun.c @@ -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)); diff --git a/src/lib/subs/detonate.c b/src/lib/subs/detonate.c index b6c69552..736c1f1c 100644 --- a/src/lib/subs/detonate.c +++ b/src/lib/subs/detonate.c @@ -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, §); issea = sect.sct_type == SCT_WATER; ncp = &nchr[nuketype];