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

@ -1137,7 +1137,7 @@ lnd_support(natid victim, natid attacker, coord x, coord y, int defending)
/* are we in range? */
dist = mapdist(land.lnd_x, land.lnd_y, x, y);
range = roundrange(effrange(land.lnd_frg, land.lnd_tech));
range = roundrange(lnd_fire_range(&land));
if (dist > range)
continue;