整理代码

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

View File

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