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.
This commit is contained in:
Markus Armbruster 2013-01-08 17:49:30 +01:00
parent bfea79a72d
commit bcff368909

View file

@ -449,7 +449,7 @@ most_valuable_ship(struct emp_qelem *list, coord x, coord y)
continue; continue;
} }
if (((struct mchrstr *)mlp->chrp)->m_cost * mlp->unit.ship.shp_effic > 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; mvs = mlp;
} }
return mvs; return mvs;