]> git.pond.sub.org Git - empserver/commitdiff
Fix misdirected prints when missile explodes on launch
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 16 May 2010 17:34:46 +0000 (19:34 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 21 Jun 2010 19:03:21 +0000 (21:03 +0200)
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.

src/lib/subs/mslsub.c

index 0b9f6cb35960117ce01cf9bcc302807431b401df..2a3aa0a146db53ab2a8f1bc211aca12124e3b305 100644 (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,8 +109,8 @@ 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",
-                  xyas(pp->pln_x, pp->pln_y, pp->pln_own), dam);
+               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);
                putsect(&sect);