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.
This commit is contained in:
parent
de5c0b1c6b
commit
7dc130b7ac
1 changed files with 1 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue