From b23c52951ff4f0d3360723f21618869165c48c5f Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 26 Dec 2009 14:02:50 +0100 Subject: [PATCH] Fix launch not to wipe out target sector updates Launching ABMs updates their base, in mission_pln_equip(). The update got wiped out when launch_missile() wrote back the target sector, triggering a seqno mismatch oops. Harmless with the stock game's ABMs, because they use neither shells nor petrol. Fix by re-reading the target sector. --- 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 932b4bd15..c4553398c 100644 --- a/src/lib/commands/laun.c +++ b/src/lib/commands/laun.c @@ -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, §); if (!msl_hit(pp, SECT_HARDTARGET, EF_SECTOR, N_SCT_MISS, N_SCT_SMISS, sublaunch, sect.sct_own)) CANT_REACH(); -- 2.43.0