(ac_flak_dam): Redesign so that code common to all its callers ends up

in this function.
This commit is contained in:
Markus Armbruster 2006-06-24 14:24:23 +00:00
parent d9c48789fb
commit d240bad7f8
3 changed files with 13 additions and 25 deletions

View file

@ -864,14 +864,7 @@ pinflak_planedamage(struct plnstr *pp, struct plchrstr *pcp, natid from,
natid plane_owner;
int dam;
flak -= pp->pln_def;
if ((pcp->pl_flags & P_T) == 0)
flak--;
if (pcp->pl_flags & P_X)
flak -= 2;
if (pcp->pl_flags & P_H)
flak -= 1;
dam = ac_flak_dam(flak);
dam = ac_flak_dam(flak, pp->pln_def, pcp->pl_flags);
disp = 0;
plane_owner = pp->pln_own;
eff = pp->pln_effic;