]> git.pond.sub.org Git - empserver/commitdiff
Fix launch not to report the same ship sunk twice
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 29 Apr 2008 19:10:33 +0000 (21:10 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 29 Apr 2008 19:10:33 +0000 (21:10 +0200)
This happened when a marine missile with a conventional warhead sunk
its target.

src/lib/commands/laun.c

index 6ea506dea499f3124bf9aea371c5eccad4feba61..9f8215b765b1b5dea4ac3c2cc244f7f2fbb863bb 100644 (file)
@@ -311,13 +311,10 @@ launch_missile(struct plnstr *pp, int sublaunch)
             */
            return RET_OK;
        }
-       dam =
-           pln_damage(pp, target_ship.shp_x, target_ship.shp_y, 'p',
-                      &nukedam, 1);
+       dam = pln_damage(pp, target_ship.shp_x, target_ship.shp_y, 'p',
+                        &nukedam, 1);
        if (!nukedam) {
            check_retreat_and_do_shipdamage(&target_ship, dam);
-           if (target_ship.shp_effic < SHIP_MINEFF)
-               pr("\t%s sunk!\n", prship(&target_ship));
            putship(target_ship.shp_uid, &target_ship);
        }
        getship(target_ship.shp_uid, &target_ship);