(find_escorts, perform_mission): Simplify.
This commit is contained in:
parent
e352801820
commit
5f94d9a651
1 changed files with 2 additions and 3 deletions
|
@ -409,8 +409,7 @@ find_escorts(coord x, coord y, natid cn, struct emp_qelem *escorts)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
dist = mapdist(x, y, plane.pln_x, plane.pln_y);
|
dist = mapdist(x, y, plane.pln_x, plane.pln_y);
|
||||||
|
if (dist > plane.pln_range / 2)
|
||||||
if (dist > ((int)((float)plane.pln_range / 2.0)))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
plp = malloc(sizeof(struct plist));
|
plp = malloc(sizeof(struct plist));
|
||||||
|
@ -628,7 +627,7 @@ perform_mission(coord x, coord y, natid victim, struct emp_qelem *list,
|
||||||
prb = ((double)md) / range2;
|
prb = ((double)md) / range2;
|
||||||
prb *= prb;
|
prb *= prb;
|
||||||
if (chance(prb))
|
if (chance(prb))
|
||||||
dam2 = (int)((float)dam2 / 2.0);
|
dam2 /= 2;
|
||||||
dam += dam2;
|
dam += dam2;
|
||||||
if (sect.sct_type == SCT_WATER)
|
if (sect.sct_type == SCT_WATER)
|
||||||
nreport(sp->shp_own, N_SHP_SHELL, victim, 1);
|
nreport(sp->shp_own, N_SHP_SHELL, victim, 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue