Factor out land unit firing range calculation into lnd_fire_range()

This commit is contained in:
Markus Armbruster 2008-03-03 20:24:52 +01:00
parent ad5f8e8904
commit 76830b5b98
5 changed files with 15 additions and 6 deletions

View file

@ -437,7 +437,7 @@ perform_mission(coord x, coord y, natid victim, struct emp_qelem *list,
(md > land_max_interdiction_range))
continue;
range = roundrange(effrange(lp->lnd_frg, lp->lnd_tech));
range = roundrange(lnd_fire_range(lp));
if (md > range)
continue;
@ -838,8 +838,7 @@ oprange(struct empobj *gp, int *radius)
range = ldround(shp_fire_range((struct shpstr *)gp), 1);
break;
case EF_LAND:
range = ldround(effrange(((struct lndstr *)gp)->lnd_frg,
((struct lndstr *)gp)->lnd_tech), 1);
range = ldround(lnd_fire_range((struct lndstr *)gp), 1);
break;
case EF_PLANE:
/* missiles go one way, so we can use all the range */