Fix launch not to report the same ship sunk twice
This happened when a marine missile with a conventional warhead sunk its target.
This commit is contained in:
parent
c539820350
commit
8209b88a54
1 changed files with 2 additions and 5 deletions
|
@ -311,13 +311,10 @@ launch_missile(struct plnstr *pp, int sublaunch)
|
||||||
*/
|
*/
|
||||||
return RET_OK;
|
return RET_OK;
|
||||||
}
|
}
|
||||||
dam =
|
dam = pln_damage(pp, target_ship.shp_x, target_ship.shp_y, 'p',
|
||||||
pln_damage(pp, target_ship.shp_x, target_ship.shp_y, 'p',
|
&nukedam, 1);
|
||||||
&nukedam, 1);
|
|
||||||
if (!nukedam) {
|
if (!nukedam) {
|
||||||
check_retreat_and_do_shipdamage(&target_ship, dam);
|
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);
|
putship(target_ship.shp_uid, &target_ship);
|
||||||
}
|
}
|
||||||
getship(target_ship.shp_uid, &target_ship);
|
getship(target_ship.shp_uid, &target_ship);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue