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
|
@ -241,7 +241,7 @@ fire_dchrg(struct shpstr *sp, struct shpstr *targ, int ntargets)
|
|||
{
|
||||
int range, erange, dam;
|
||||
|
||||
erange = roundrange(effrange(sp->shp_frnge, sp->shp_tech));
|
||||
erange = roundrange(shp_fire_range(sp));
|
||||
range = mapdist(sp->shp_x, sp->shp_y, targ->shp_x, targ->shp_y);
|
||||
if (range > erange)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue