Fix some incorrect AI collision checks
authorWuzzy <Wuzzy2@mail.ru>
Sat, 18 Jul 2020 23:53:14 +0200
changeset 15749 f9c2fd4bfb3e
parent 15748 12973ea952c6
child 15750 cc8882e46784
Fix some incorrect AI collision checks
hedgewars/uAIMisc.pas
--- a/hedgewars/uAIMisc.pas	Fri Jul 17 02:51:25 2020 +0200
+++ b/hedgewars/uAIMisc.pas	Sat Jul 18 23:53:14 2020 +0200
@@ -402,7 +402,7 @@
 
     if (Land[y-r, x-r] > lfAllObjMask) or
        (Land[y+r, x-r] > lfAllObjMask) or
-       (Land[y-r, x-r] > lfAllObjMask) or
+       (Land[y-r, x+r] > lfAllObjMask) or
        (Land[y+r, x+r] > lfAllObjMask) then
        exit(true);
 
@@ -416,7 +416,7 @@
 
     if (Land[y-r, x-r] and lfNotCurHogCrate <> 0) or
        (Land[y+r, x-r] and lfNotCurHogCrate <> 0) or
-       (Land[y+r, x-r] and lfNotCurHogCrate <> 0) or
+       (Land[y-r, x+r] and lfNotCurHogCrate <> 0) or
        (Land[y+r, x+r] and lfNotCurHogCrate <> 0) then
        exit(true);