X-Git-Url: http://git.pond.sub.org/?p=empserver;a=blobdiff_plain;f=src%2Flib%2Fsubs%2Fmove.c;fp=src%2Flib%2Fsubs%2Fmove.c;h=95ac4e820789481702e2fe564047832860e192a0;hp=e1b0363217e6af5d6463936c2650a405d091bfbf;hb=bfac52eb6d5bd16ad4b4421b34cac4338dd9c231;hpb=539c44a13a4d2271566ee27dc956f698bfd215c1 diff --git a/src/lib/subs/move.c b/src/lib/subs/move.c index e1b036321..95ac4e820 100644 --- a/src/lib/subs/move.c +++ b/src/lib/subs/move.c @@ -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, §) < 0) { + if (!getsect(curx, cury, §)) { 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;