(add, plane_bomb, pinflak_planedamage, doship, dounit, doplane, laun)

(launch_sat, scra, scut, scuttle_ship, scuttle_land, knockdown)
(ac_planedamage, detonate, attack_val, defense_val, air_damage)
(msl_intercept, msl_launch_mindam, pln_prewrite, shp_prewrite):
Simplify unit destruction: just zero efficiency, leave makelost()
etc. to the prewrite callback.
This commit is contained in:
Markus Armbruster 2006-05-27 19:25:12 +00:00
parent 1b94ddedc3
commit 0c1bd8e98b
14 changed files with 26 additions and 98 deletions

View file

@ -301,9 +301,7 @@ detonate(struct nukstr *np, coord x, coord y, int airburst)
continue;
if (roll(100) >= damage)
continue;
makelost(EF_NUKE, nuke.nuk_own, nuke.nuk_uid,
nuke.nuk_x, nuke.nuk_y);
nuke.nuk_own = 0;
nuke.nuk_effic = 0;
if (own == bombown) {
mpr(bombown, "%s at %s destroyed\n",
prnuke(&nuke), xyas(nuke.nuk_x, nuke.nuk_y, own));