Clean up and simplify snxtitem_dist() and snxtsct_dist()
No functional change.
This commit is contained in:
parent
d17f33d138
commit
bf9389a7a9
2 changed files with 1 additions and 14 deletions
|
@ -152,25 +152,17 @@ void
|
||||||
snxtitem_dist(struct nstr_item *np, int type, int cx, int cy,
|
snxtitem_dist(struct nstr_item *np, int type, int cx, int cy,
|
||||||
int dist)
|
int dist)
|
||||||
{
|
{
|
||||||
struct range range;
|
|
||||||
|
|
||||||
memset(np, 0, sizeof(*np));
|
memset(np, 0, sizeof(*np));
|
||||||
xydist_range(cx, cy, dist, &range);
|
xydist_range(cx, cy, dist, &np->range);
|
||||||
np->cur = -1;
|
np->cur = -1;
|
||||||
np->type = type;
|
np->type = type;
|
||||||
np->sel = NS_DIST;
|
np->sel = NS_DIST;
|
||||||
np->cx = cx;
|
np->cx = cx;
|
||||||
np->cy = cy;
|
np->cy = cy;
|
||||||
np->index = -1;
|
np->index = -1;
|
||||||
np->range = range;
|
|
||||||
np->dist = dist;
|
np->dist = dist;
|
||||||
np->read = ef_read;
|
np->read = ef_read;
|
||||||
np->flags = ef_flags(type);
|
np->flags = ef_flags(type);
|
||||||
#if 0
|
|
||||||
/* This is no longer proper. */
|
|
||||||
/* It did the wrong thing for small, hitech worlds. */
|
|
||||||
xysize_range(&np->range);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -152,11 +152,6 @@ snxtsct_dist(struct nstr_sect *np, coord cx, coord cy, int dist)
|
||||||
np->y = np->range.ly;
|
np->y = np->range.ly;
|
||||||
np->dx = -1;
|
np->dx = -1;
|
||||||
np->dy = 0;
|
np->dy = 0;
|
||||||
#if 0
|
|
||||||
/* This function is now done elsewhere. */
|
|
||||||
/* It was not doing the right thing when the world was small */
|
|
||||||
xysize_range(&np->range);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue