Disable collateral damage for automatically launched missiles

4.0.17 made missiles that miss their target do collateral damage to
the target sector.  The code didn't work: it did collateral damage
even when the launch failed or the missile got intercepted.  4.0.18
disabled it again for the launch command (see also commit fa7e3aa9).

Disable it for automatically launched missiles, too, in
msl_launch_mindam().
This commit is contained in:
Markus Armbruster 2008-08-02 14:42:06 -04:00
parent 24aaec7e34
commit 132b20434d

View file

@ -411,10 +411,17 @@ msl_launch_mindam(struct emp_qelem *list, coord x, coord y, int hardtarget,
dam += nukedam; dam += nukedam;
} else } else
dam += newdam; dam += newdam;
#if 0
/*
* FIXME want collateral damage on miss (which can't
* happen for nuclear war heads), but we get here too when
* launch fails or missile is intercepted
*/
} else { } else {
/* Missiles that miss have to hit somewhere! */ /* Missiles that miss have to hit somewhere! */
newdam = pln_damage(&plp->plane, x, y, 'p', &nukedam, 0); newdam = pln_damage(&plp->plane, x, y, 'p', &nukedam, 0);
collateral_damage(x, y, newdam); collateral_damage(x, y, newdam);
#endif
} }
plp->plane.pln_effic = 0; plp->plane.pln_effic = 0;
putplane(plp->plane.pln_uid, &plp->plane); putplane(plp->plane.pln_uid, &plp->plane);