]> git.pond.sub.org Git - empserver/commitdiff
Don't recompute sct_coastal in desi(), just use it
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 17 Feb 2008 07:56:14 +0000 (08:56 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 17 Feb 2008 07:56:14 +0000 (08:56 +0100)
No need to recompute it since sct_coastal was redesigned to be
reliable in 4.3.0 (commit 7b947943),

src/lib/commands/desi.c

index afbd7fcceaa35d27e498dbff60dc5f9913d522d3..637176154f9b09bbf28de234285d4a5e99e5e0bb 100644 (file)
@@ -97,25 +97,13 @@ desi(void)
            continue;
        if (sect.sct_type == SCT_SANCT)
            breaksanct++;
-       if ((des == SCT_HARBR) || (des == SCT_BHEAD)) {
-           for (n = 1; n <= 6; n++) {
-               getsect(nstr.x + diroff[n][0],
-                       nstr.y + diroff[n][1], &check);
-               if (check.sct_type == SCT_WATER)
-                   break;
-               if (check.sct_type == SCT_BSPAN)
-                   break;
-               if (check.sct_type == SCT_BTOWER)
-                   break;
-           }
-           if (n > 6) {
-               pr("%s does not border on water.\n",
-                  xyas(nstr.x, nstr.y, player->cnum));
-               if (player->god)
-                   pr("But if it's what you want ...\n");
-               else
-                   continue;
-           }
+       if ((des == SCT_HARBR || des == SCT_BHEAD) && !sect.sct_coastal) {
+           pr("%s does not border on water.\n",
+              xyas(nstr.x, nstr.y, player->cnum));
+           if (player->god)
+               pr("But if it's what you want ...\n");
+           else
+               continue;
        }
        if (sect.sct_type == SCT_SANCT && !player->god)
            continue;