]> git.pond.sub.org Git - empserver/commitdiff
Clean up and simplify snxtitem_dist() and snxtsct_dist()
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 17 Aug 2008 11:51:23 +0000 (07:51 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 19 Aug 2008 12:54:05 +0000 (08:54 -0400)
No functional change.

src/lib/subs/snxtitem.c
src/lib/subs/snxtsct.c

index c5bea17e666e59921b3f7fa50de01a9a41c36b6e..28aa2abf9698227323549f25f2ed49e3c5bccb5a 100644 (file)
@@ -152,25 +152,17 @@ void
 snxtitem_dist(struct nstr_item *np, int type, int cx, int cy,
              int dist)
 {
-    struct range range;
-
     memset(np, 0, sizeof(*np));
-    xydist_range(cx, cy, dist, &range);
+    xydist_range(cx, cy, dist, &np->range);
     np->cur = -1;
     np->type = type;
     np->sel = NS_DIST;
     np->cx = cx;
     np->cy = cy;
     np->index = -1;
-    np->range = range;
     np->dist = dist;
     np->read = ef_read;
     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
index 65aef15aefc4c62de2ebfb08540906b523220ec0..97992f70423be8299457e58707eb4103d7df06a5 100644 (file)
@@ -152,11 +152,6 @@ snxtsct_dist(struct nstr_sect *np, coord cx, coord cy, int dist)
     np->y = np->range.ly;
     np->dx = -1;
     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