Factor out land unit firing range calculation into lnd_fire_range()
This commit is contained in:
parent
ad5f8e8904
commit
76830b5b98
5 changed files with 15 additions and 6 deletions
|
@ -362,7 +362,7 @@ multifire(void)
|
|||
continue;
|
||||
}
|
||||
|
||||
range = effrange(fland.lnd_frg, fland.lnd_tech);
|
||||
range = lnd_fire_range(&fland);
|
||||
range2 = roundrange(range);
|
||||
pr("range is %d.00 (%.2f)\n", range2, range);
|
||||
if (target == targ_sub) {
|
||||
|
@ -777,7 +777,7 @@ quiet_bigdef(int attacker, struct emp_qelem *list, natid own, natid aown,
|
|||
if ((land.lnd_own != own) && ((rel != ALLIED) || (rel2 != AT_WAR)))
|
||||
continue;
|
||||
|
||||
erange = effrange(land.lnd_frg, land.lnd_tech);
|
||||
erange = lnd_fire_range(&land);
|
||||
if (roundrange(erange) < ni.curdist)
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue