(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

@ -64,8 +64,6 @@ attack_val(int combat_mode, struct lndstr *lp)
struct lchrstr *lcp;
if (lp->lnd_effic < LAND_MINEFF) {
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid, lp->lnd_x, lp->lnd_y);
lp->lnd_own = 0;
putland(lp->lnd_uid, lp);
return 0;
}
@ -104,8 +102,6 @@ defense_val(struct lndstr *lp)
struct lchrstr *lcp;
if (lp->lnd_effic < LAND_MINEFF) {
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid, lp->lnd_x, lp->lnd_y);
lp->lnd_own = 0;
putland(lp->lnd_uid, lp);
return 0;
}