diff --git a/parts/ai.lua b/parts/ai.lua index 786a3a06..37a5786e 100644 --- a/parts/ai.lua +++ b/parts/ai.lua @@ -285,16 +285,11 @@ return{ repeat YIELD() success,result,dest,hold,move=pcall(CC.getMove,P.AI_bot) - until not success or result == 0 or result == 2 + until not success or result==0 or result==2 if not success then break end if result==2 then ins(keys,6) elseif result==0 then - for i=1,#dest do - for j=1,#dest[i]do - dest[i][j]=dest[i][j]+1 - end - end P.AI_dest=dest if hold then keys[1]=8 end--Hold while move[1]do diff --git a/parts/player/player.lua b/parts/player/player.lua index b0655c87..00758114 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -511,7 +511,7 @@ function Player.lock(P) local x=P.curX+j-1 if dest then for k=1,#dest do - if x==dest[k][1]and y==dest[k][2]then + if x==dest[k][1]+1 and y==dest[k][2]+1 then rem(dest,k) goto success end