整理代码

This commit is contained in:
MrZ626
2020-12-14 11:36:59 +08:00
parent 42f02bb9fc
commit 54abfee660
2 changed files with 8 additions and 8 deletions

View File

@@ -617,12 +617,12 @@ end
Press key 4 after 255+255+255+62 frame Press key 4 after 255+255+255+62 frame
...... ......
]] ]]
function dumpRecording(list) function dumpRecording(list,ptr)
local out="" local out=""
local buffer="" local buffer=""
local prevFrm=0 local prevFrm=0
local p=1 ptr=ptr or 1
while list[p]do while list[ptr]do
--Check buffer size --Check buffer size
if #buffer>10 then if #buffer>10 then
out=out..buffer out=out..buffer
@@ -630,8 +630,8 @@ function dumpRecording(list)
end end
--Encode time --Encode time
local t=list[p]-prevFrm local t=list[ptr]-prevFrm
prevFrm=list[p] prevFrm=list[ptr]
while t>=255 do while t>=255 do
buffer=buffer.."\255" buffer=buffer.."\255"
t=t-255 t=t-255
@@ -639,11 +639,11 @@ function dumpRecording(list)
buffer=buffer..char(t) buffer=buffer..char(t)
--Encode key --Encode key
t=list[p+1] t=list[ptr+1]
buffer=buffer..char(t>0 and t or 256+t) buffer=buffer..char(t>0 and t or 256+t)
--Step --Step
p=p+2 ptr=ptr+2
end end
return data.encode("string","base64",out..buffer) return data.encode("string","base64",out..buffer)
end end

View File

@@ -223,7 +223,7 @@ PLAYERS={alive={}}--Players data
RANKS={sprint_10=0} RANKS={sprint_10=0}
SETTING={ SETTING={
--Game --Tuning
das=10,arr=2,dascut=0, das=10,arr=2,dascut=0,
sddas=0,sdarr=2, sddas=0,sdarr=2,
ihs=true,irs=true,ims=true, ihs=true,irs=true,ims=true,