Fix misdirected prints when missile explodes on launch

msl_launch() printed some lines to the player instead of the missile
owner when the missile exploded on launch.  They are different when
the launch is for a mission or an interception.  This disclosed the
the owner's origin.  Broken in Empire 2.
This commit is contained in:
Markus Armbruster 2010-05-16 19:34:46 +02:00
parent 53dc49c85c
commit 40bc823474

View file

@ -99,7 +99,7 @@ msl_launch(struct plnstr *pp, int type, char *what, coord x, coord y,
* (1 - techfact(pp->pln_tech, 1.0)))) {
mpr(pp->pln_own, "KABOOOOM! Missile explodes %s!\n", from);
if (getnuke(nuk_on_plane(pp), &nuke)) {
pr("%s lost!\n", prnuke(&nuke));
mpr(pp->pln_own, "%s lost!\n", prnuke(&nuke));
nuke.nuk_effic = 0;
putnuke(nuke.nuk_uid, &nuke);
}
@ -109,7 +109,7 @@ msl_launch(struct plnstr *pp, int type, char *what, coord x, coord y,
shipdamage(&ship, dam);
putship(ship.shp_uid, &ship);
} else {
pr("Explosion damages %s %d%%\n",
mpr(pp->pln_own, "Explosion damages %s %d%%\n",
xyas(pp->pln_x, pp->pln_y, pp->pln_own), dam);
getsect(pp->pln_x, pp->pln_y, &sect);
sectdamage(&sect, dam);