Commit
a269cdd7 (v4.3.23) removed the nuclear damage. But it left the
nuke on the missile, which made pln_damage() oops and return zero
damage.
Fix by destroying the nuke separately.
(cherry picked from commit
876f3424b0bb28efab505722d89b34395ad43ae6)
natid victim, int *sublaunchp)
{
struct shpstr ship;
natid victim, int *sublaunchp)
{
struct shpstr ship;
struct sctstr sect;
int sublaunch = 0;
char *from;
struct sctstr sect;
int sublaunch = 0;
char *from;
if (chance((0.05 + (100 - pp->pln_effic) / 100.0)
* (1 - techfact(pp->pln_tech, 1.0)))) {
mpr(pp->pln_own, "KABOOOOM! Missile explodes %s!\n", from);
if (chance((0.05 + (100 - pp->pln_effic) / 100.0)
* (1 - techfact(pp->pln_tech, 1.0)))) {
mpr(pp->pln_own, "KABOOOOM! Missile explodes %s!\n", from);
+ if (getnuke(nuk_on_plane(pp), &nuke)) {
+ pr("%s lost!\n", prnuke(&nuke));
+ nuke.nuk_effic = 0;
+ putnuke(nuke.nuk_uid, &nuke);
+ }
if (chance(0.33)) {
dam = pln_damage(pp, 'p', 1) / 2;
if (pp->pln_ship >= 0) {
if (chance(0.33)) {
dam = pln_damage(pp, 'p', 1) / 2;
if (pp->pln_ship >= 0) {
int effective = 1;
int pinbomber = 0;
int effective = 1;
int pinbomber = 0;
- if (CANT_HAPPEN(nuk_on_plane(pp) >= 0)) /* FIXME check uses! */
+ if (CANT_HAPPEN(nuk_on_plane(pp) >= 0))
return 0;
load = pln_load(pp);
return 0;
load = pln_load(pp);