(plane_sona): Compute range multiplier in double rather than int, to
match the formula used for sweep chance in plane_sweep(). Rounding intermediate values is ugly anyway.
This commit is contained in:
parent
36c73ca99a
commit
898d1422fa
1 changed files with 1 additions and 4 deletions
|
@ -248,10 +248,7 @@ plane_sona(struct emp_qelem *plane_list, int x, int y,
|
||||||
pcp = ip->pcp;
|
pcp = ip->pcp;
|
||||||
if (!(pcp->pl_flags & P_A)) /* if it isn't an ASW plane */
|
if (!(pcp->pl_flags & P_A)) /* if it isn't an ASW plane */
|
||||||
continue;
|
continue;
|
||||||
range = (int)techfact(pp->pln_tech, (100 - pp->pln_acc) / 10);
|
range = (int)techfact(pp->pln_tech, (100.0 - pp->pln_acc) / 10.0);
|
||||||
/*
|
|
||||||
for (i=0; targ = getshipp(i); i++) {
|
|
||||||
*/
|
|
||||||
for (i = 0; getship(i, &s); i++) {
|
for (i = 0; getship(i, &s); i++) {
|
||||||
targ = &s;
|
targ = &s;
|
||||||
if (targ->shp_own == pp->pln_own || targ->shp_own == 0)
|
if (targ->shp_own == pp->pln_own || targ->shp_own == 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue