bomb fire launch torpedo: Don't disclose ship sinking in retreat
These commands report "sunk!" even when the ship survives the attack but sinks during retreat. bomb even reports where on the retreat the ship sinks. Has been that way since retreat was added in Chainsaw. Report "sunk!" only when the attack sinks the ship directly. Similar code exists for land units, but it doesn't report killings. Change it anyway, to keep it consistent with the ship code. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
f9316f71c4
commit
2294785412
6 changed files with 28 additions and 59 deletions
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* Known contributors to this file:
|
||||
* Steve McClure, 2000
|
||||
* Markus Armbruster, 2004-2014
|
||||
* Markus Armbruster, 2004-2015
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
@ -423,16 +423,14 @@ multifire(void)
|
|||
break;
|
||||
default:
|
||||
getship(vshipno, &vship);
|
||||
check_retreat_and_do_shipdamage(&vship, dam);
|
||||
shipdamage(&vship, dam);
|
||||
if (vship.shp_effic < SHIP_MINEFF)
|
||||
pr("%s sunk!\n", prsub(&vship));
|
||||
else if (target == targ_sub
|
||||
&& (vship.shp_rflags & RET_DCHRGED)
|
||||
&& !(vship.shp_rflags & RET_INJURED))
|
||||
if (dam && (vship.shp_rflags & RET_INJURED))
|
||||
retreat_ship(&vship, 'i');
|
||||
else if (target == targ_sub && (vship.shp_rflags & RET_DCHRGED))
|
||||
retreat_ship(&vship, 'd');
|
||||
else if (totaldefdam == 0
|
||||
&& (vship.shp_rflags & RET_HELPLESS)
|
||||
&& !(vship.shp_rflags & RET_INJURED))
|
||||
else if (totaldefdam == 0 && (vship.shp_rflags & RET_HELPLESS))
|
||||
retreat_ship(&vship, 'h');
|
||||
putship(vship.shp_uid, &vship);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue