Factor out ship firing range calculation into shp_fire_range()

This commit is contained in:
Markus Armbruster 2008-03-03 20:20:39 +01:00
parent b3c5ba2f75
commit ad5f8e8904
6 changed files with 16 additions and 7 deletions

View file

@ -91,7 +91,7 @@ sd(natid att, natid own, coord x, coord y, int noisy, int defending,
continue;
if ((mchr[(int)ship.shp_type].m_flags & M_SUB) && !usesubs)
continue;
range = roundrange(effrange(ship.shp_frnge, ship.shp_tech));
range = roundrange(shp_fire_range(&ship));
if (range < ni.curdist)
continue;
dam = shp_fire(&ship);