玩家的随机数生成器独立为四个,尝试避免联网对战时不同步错误,整理代码

This commit is contained in:
MrZ626
2021-05-13 02:34:32 +08:00
parent adbb888fe4
commit cc1261c285
25 changed files with 82 additions and 77 deletions

View File

@@ -11,7 +11,7 @@ local function task_PC(P)
D.counter=D.counter+1
if D.counter==26 then
local base=PCbase[D.type]
P:pushLineList(base[P:RND(#base)],D.symmetry)
P:pushLineList(base[P.holeRND:random(#base)],D.symmetry)
end
end
end
@@ -23,8 +23,8 @@ local function check(P)
end
else
local type=P.stat.pc<10 and 4 or 5
local L=PClist[type][P:RND(#PClist[type])]
local symmetry=P:RND()>.5
local L=PClist[type][P.holeRND:random(#PClist[type])]
local symmetry=P.holeRND:random()>.5
P.modeData.type=type
P.modeData.symmetry=symmetry
P:pushNextList(L,symmetry)