]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/laun.c
Fix launch not to wipe out target sector updates
[empserver] / src / lib / commands / laun.c
index 62b3b5b6f229bbdb035405be546cb3b9d9baeec4..c4553398c902cf48eccd82f463cf9929317e163e 100644 (file)
@@ -246,6 +246,7 @@ launch_missile(struct plnstr *pp)
        if (msl_launch(pp, EF_SECTOR, "sector", sx, sy, sect.sct_own,
                       &sublaunch) < 0)
            return RET_OK;
+       getsect(sx, sy, &sect);
        if (!msl_hit(pp, SECT_HARDTARGET, EF_SECTOR,
                     N_SCT_MISS, N_SCT_SMISS, sublaunch, sect.sct_own))
            CANT_REACH();
@@ -276,6 +277,7 @@ launch_missile(struct plnstr *pp)
                       target_ship.shp_x, target_ship.shp_y,
                       target_ship.shp_own, &sublaunch) < 0)
            return RET_OK;
+       getship(n, &target_ship);
        if (!msl_hit(pp, shp_hardtarget(&target_ship), EF_SHIP,
                     N_SHP_MISS, N_SHP_SMISS, sublaunch,
                     target_ship.shp_own)) {