Use snxtitem_xy() instead of snxtitem_dist(..., 0)
Affected: launch_as() and takeover().
This commit is contained in:
parent
058cabfa3b
commit
dce3ba7e2f
2 changed files with 3 additions and 3 deletions
|
@ -158,7 +158,7 @@ launch_as(struct plnstr *pp)
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
goodtarget = 0;
|
goodtarget = 0;
|
||||||
snxtitem_dist(&ni, EF_PLANE, sx, sy, 0);
|
snxtitem_xy(&ni, EF_PLANE, sx, sy);
|
||||||
while (!goodtarget && nxtitem(&ni, &plane)) {
|
while (!goodtarget && nxtitem(&ni, &plane)) {
|
||||||
if (!plane.pln_own)
|
if (!plane.pln_own)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -73,7 +73,7 @@ takeover(struct sctstr *sp, natid newown)
|
||||||
|
|
||||||
pp = &p;
|
pp = &p;
|
||||||
/* Take over planes */
|
/* Take over planes */
|
||||||
snxtitem_dist(&ni, EF_PLANE, sp->sct_x, sp->sct_y, 0);
|
snxtitem_xy(&ni, EF_PLANE, sp->sct_x, sp->sct_y);
|
||||||
while (nxtitem(&ni, pp)) {
|
while (nxtitem(&ni, pp)) {
|
||||||
if (pp->pln_own != sp->sct_own)
|
if (pp->pln_own != sp->sct_own)
|
||||||
continue;
|
continue;
|
||||||
|
@ -82,7 +82,7 @@ takeover(struct sctstr *sp, natid newown)
|
||||||
|
|
||||||
/* Take over land units */
|
/* Take over land units */
|
||||||
lp = &land;
|
lp = &land;
|
||||||
snxtitem_dist(&ni, EF_LAND, sp->sct_x, sp->sct_y, 0);
|
snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
|
||||||
while (nxtitem(&ni, lp)) {
|
while (nxtitem(&ni, lp)) {
|
||||||
if ((lp->lnd_own == newown) || (lp->lnd_own == 0))
|
if ((lp->lnd_own == newown) || (lp->lnd_own == 0))
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue