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:
Markus Armbruster 2015-02-01 17:24:51 +01:00
parent f4d8d64bb3
commit 2575ea8940

View file

@ -570,7 +570,7 @@ plane_bomb(struct emp_qelem *list, struct sctstr *target)
plane.pln_effic = 0;
else
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",
cname(player->cnum), dam, prplane(&plane),
xyas(target->sct_x, target->sct_y, own));