Factor out ship firing range calculation into shp_fire_range()
This commit is contained in:
parent
b3c5ba2f75
commit
ad5f8e8904
6 changed files with 16 additions and 7 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue