From bcff368909d82ee3002fa61ac938c2e3ab5211ed Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 8 Jan 2013 17:49:30 +0100 Subject: [PATCH] Take ship cost into account when picking missile interdiction target Due to a typo, shp_missile_interdiction() picks the admissible target with highest efficiency instead of the one with highest efficiency * build cost. Broken in commit cd8d7423, v4.3.8. --- src/lib/subs/shpsub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/subs/shpsub.c b/src/lib/subs/shpsub.c index 66d3ec73..e7963f73 100644 --- a/src/lib/subs/shpsub.c +++ b/src/lib/subs/shpsub.c @@ -449,7 +449,7 @@ most_valuable_ship(struct emp_qelem *list, coord x, coord y) continue; } if (((struct mchrstr *)mlp->chrp)->m_cost * mlp->unit.ship.shp_effic > - ((struct mchrstr *)mlp->chrp)->m_cost * mvs->unit.ship.shp_effic) + ((struct mchrstr *)mvs->chrp)->m_cost * mvs->unit.ship.shp_effic) mvs = mlp; } return mvs;