]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/move.c
move_ground: Fix getsect() error checking
[empserver] / src / lib / subs / move.c
index e1b0363217e6af5d6463936c2650a405d091bfbf..95ac4e820789481702e2fe564047832860e192a0 100644 (file)
@@ -111,7 +111,7 @@ move_ground(struct sctstr *start, struct sctstr *end,
     curx = start->sct_x;
     cury = start->sct_y;
     total_mcost = 0.0;
-    if (getsect(curx, cury, &sect) < 0) {
+    if (!getsect(curx, cury, &sect)) {
        logerror("move_path: getsect %d,%d", curx, cury);
        return -1;
     }
@@ -191,7 +191,7 @@ move_ground(struct sctstr *start, struct sctstr *end,
         */
        tmpx = curx + diroff[dir][0];
        tmpy = cury + diroff[dir][1];
-       if (getsect(tmpx, tmpy, &next) < 0) {
+       if (!getsect(tmpx, tmpy, &next)) {
            pr("You can't go there...\n");
            *movstr = 0;
            continue;