修复刚安装就用简洁模式玩会报错(修改成绩比较逻辑)
This commit is contained in:
@@ -1610,26 +1610,27 @@ local function gameOver()--Save record
|
|||||||
GAME.rank=R
|
GAME.rank=R
|
||||||
end
|
end
|
||||||
if scoreValid()and M.score then
|
if scoreValid()and M.score then
|
||||||
local r=RANKS[M.name]--Old rank
|
if RANKS[M.name]then--Old rank exist
|
||||||
local needSave
|
local needSave
|
||||||
if R>r then
|
if R>RANKS[M.name]then
|
||||||
RANKS[M.name]=R
|
RANKS[M.name]=R
|
||||||
needSave=true
|
needSave=true
|
||||||
end
|
end
|
||||||
if R>0 then
|
if R>0 then
|
||||||
if M.unlock then
|
if M.unlock then
|
||||||
for i=1,#M.unlock do
|
for i=1,#M.unlock do
|
||||||
local m=M.unlock[i]
|
local m=M.unlock[i]
|
||||||
local n=MODES[m].name
|
local n=MODES[m].name
|
||||||
if not RANKS[n]then
|
if not RANKS[n]then
|
||||||
RANKS[n]=MODES[m].getRank and 0 or 6
|
RANKS[n]=MODES[m].getRank and 0 or 6
|
||||||
needSave=true
|
needSave=true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
if needSave then
|
||||||
if needSave then
|
FILE.save(RANKS,"conf/unlock","q")
|
||||||
FILE.save(RANKS,"conf/unlock","q")
|
end
|
||||||
end
|
end
|
||||||
local D=M.score(P)
|
local D=M.score(P)
|
||||||
local L=M.records
|
local L=M.records
|
||||||
|
|||||||
Reference in New Issue
Block a user