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;
|
||||
}
|
||||
goodtarget = 0;
|
||||
snxtitem_dist(&ni, EF_PLANE, sx, sy, 0);
|
||||
snxtitem_xy(&ni, EF_PLANE, sx, sy);
|
||||
while (!goodtarget && nxtitem(&ni, &plane)) {
|
||||
if (!plane.pln_own)
|
||||
continue;
|
||||
|
|
|
@ -73,7 +73,7 @@ takeover(struct sctstr *sp, natid newown)
|
|||
|
||||
pp = &p;
|
||||
/* 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)) {
|
||||
if (pp->pln_own != sp->sct_own)
|
||||
continue;
|
||||
|
@ -82,7 +82,7 @@ takeover(struct sctstr *sp, natid newown)
|
|||
|
||||
/* Take over land units */
|
||||
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)) {
|
||||
if ((lp->lnd_own == newown) || (lp->lnd_own == 0))
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue