bomb: Fix damage to mobility when bombing planes
A bombed plane's mobility is multiplied by dam/100.0, i.e. the higher the damage, the lower the mobility loss. Has always been broken. Fix by computing the new mobility with damage(), like we do elsewhere. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
f4d8d64bb3
commit
2575ea8940
1 changed files with 1 additions and 1 deletions
|
@ -570,7 +570,7 @@ plane_bomb(struct emp_qelem *list, struct sctstr *target)
|
||||||
plane.pln_effic = 0;
|
plane.pln_effic = 0;
|
||||||
else
|
else
|
||||||
plane.pln_effic -= dam;
|
plane.pln_effic -= dam;
|
||||||
plane.pln_mobil = (dam * plane.pln_mobil / 100.0);
|
plane.pln_mobil = damage(plane.pln_mobil, dam);
|
||||||
mpr(own, "%s bombs did %d%% damage to %s at %s\n",
|
mpr(own, "%s bombs did %d%% damage to %s at %s\n",
|
||||||
cname(player->cnum), dam, prplane(&plane),
|
cname(player->cnum), dam, prplane(&plane),
|
||||||
xyas(target->sct_x, target->sct_y, own));
|
xyas(target->sct_x, target->sct_y, own));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue