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

@ -255,6 +255,15 @@ fortrange(struct sctstr *sp)
return rng;
}
/*
* Return firing range for ship SP.
*/
double
shp_fire_range(struct shpstr *sp)
{
return effrange(sp->shp_frnge, sp->shp_tech);
}
int
roundrange(double r)
{