Skip to content

Commit

Permalink
修setField函数没有使用方块cid来标记方块连接
Browse files Browse the repository at this point in the history
base玩家的serialize方法不再print一些必定触发的信息
  • Loading branch information
MrZ626 committed Oct 8, 2024
1 parent 1e3c05f commit 08b9f87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion assets/game/basePlayer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ local function dump(self,L,t,path)
s=s..(s=='{' and k or ','..k)..v
end
else
LOG("Filtered: "..nPath)
-- print("Filtered: "..nPath)
end
end
return s..'}'
Expand Down
8 changes: 4 additions & 4 deletions assets/game/brikPlayer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1367,10 +1367,10 @@ function BP:setField(arg)
for y=1,#arg do
for x=1,w do
if f[y][x] then
if f[y] and f[y][x-1] then f[y][x].conn[f[y][x-1]]=0 end
if f[y] and f[y][x+1] then f[y][x].conn[f[y][x+1]]=0 end
if f[y-1] and f[y-1][x] then f[y][x].conn[f[y-1][x]]=0 end
if f[y+1] and f[y+1][x] then f[y][x].conn[f[y+1][x]]=0 end
if f[y] and f[y][x-1] then f[y][x].conn[f[y][x-1].cid]=0 end
if f[y] and f[y][x+1] then f[y][x].conn[f[y][x+1].cid]=0 end
if f[y-1] and f[y-1][x] then f[y][x].conn[f[y-1][x].cid]=0 end
if f[y+1] and f[y+1][x] then f[y][x].conn[f[y+1][x].cid]=0 end
end
end
end
Expand Down

0 comments on commit 08b9f87

Please sign in to comment.