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