From 2575ea89402c8a32f1f30e85d2b6b2db21fe9970 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 1 Feb 2015 17:24:51 +0100 Subject: [PATCH] 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 --- src/lib/commands/bomb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/commands/bomb.c b/src/lib/commands/bomb.c index 38487f502..d44d7d7d6 100644 --- a/src/lib/commands/bomb.c +++ b/src/lib/commands/bomb.c @@ -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)); -- 2.43.0