diff --git a/parts/player/init.lua b/parts/player/init.lua index 604747f6..1108b400 100644 --- a/parts/player/init.lua +++ b/parts/player/init.lua @@ -330,15 +330,24 @@ local function _applyGameEnv(P)-- Finish gameEnv processing local seqGen=coroutine.create(getSeqGen(P)) local seqCalled=false + local initSZOcount=0 function P:newNext() local status,piece if seqCalled then status,piece=coroutine.resume(seqGen,P.field,P.stat) else status,piece=coroutine.resume(seqGen,P.seqRND,P.gameEnv.seqData) + seqCalled=true end - seqCalled=true if status and piece then + if ENV.noInitSZO and initSZOcount<5 then + initSZOcount=initSZOcount+1 + if piece==1 or piece==2 or piece==6 then + return self:newNext() + else + initSZOcount=5 + end + end P:getNext(piece) elseif not status then assert(piece=='cannot resume dead coroutine') @@ -347,18 +356,6 @@ local function _applyGameEnv(P)-- Finish gameEnv processing for _=1,ENV.nextCount do P:newNext() end - -- TODO: make noInitSZO work - -- if ENV.noInitSZO then - -- for _=1,5 do - -- local C=P.nextQueue[1] - -- if C and (C.id==1 or C.id==2 or C.id==6) then - -- table.remove(P.nextQueue,1) - -- else - -- break - -- end - -- end - -- P:newNext() - -- end if P.miniMode then ENV.lockFX=false