From 7dc130b7ace548f9807f96f2686fb59f2267ea0f Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 26 Dec 2009 11:28:25 +0100 Subject: [PATCH] Fix launch not to wipe out target ship updates Ships can expend shells to defend against missiles, in shp_missile_defense(). Any shell use by the target ship got wiped out when launch_missile() wrote back the target ship, triggering a seqno mismatch oops. Fix by re-reading the target ship. --- src/lib/commands/laun.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/commands/laun.c b/src/lib/commands/laun.c index 62b3b5b6f..932b4bd15 100644 --- a/src/lib/commands/laun.c +++ b/src/lib/commands/laun.c @@ -276,6 +276,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)) { -- 2.43.0