]> git.pond.sub.org Git - empserver/commitdiff
Simplify mapdist()
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 31 Aug 2008 13:53:33 +0000 (09:53 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 4 Sep 2008 00:43:13 +0000 (20:43 -0400)
It became needlessly complicated in 4.0.1 to fix a "bug in mapdist not
taking world edges into account nicely enough."  That "fix" had no
effect, which was good, because it wasn't broken.

src/lib/common/mapdist.c

index 50d90c00c8352e8390d3dab340216ec8567d3205..098789be481966ad3815ebf8c77ebcf68f019353 100644 (file)
@@ -70,10 +70,6 @@ mapdist(int x1, int y1, int x2, int y2)
 {
     int dx, dy;
 
-    x1 = x1 % WORLD_X;
-    y1 = y1 % WORLD_Y;
-    x2 = x2 % WORLD_X;
-    y2 = y2 % WORLD_Y;
     dx = deltax(x1, x2);
     dy = deltay(y1, y2);
     if (dx > dy)