add early return in freshBlockGhost

This commit is contained in:
Imple Lee
2023-11-21 15:10:37 +08:00
parent 3219da77e9
commit 2604d034fe

View File

@@ -948,8 +948,8 @@ function Player:changeAtk(R)
end end
end end
function Player:freshBlockGhost() function Player:freshBlockGhost()
if not self.cur then return end
local ENV=self.gameEnv local ENV=self.gameEnv
if self.cur then
local CB=self.cur.bk local CB=self.cur.bk
self.ghoY=min(#self.field+1,self.curY) self.ghoY=min(#self.field+1,self.curY)
if self._20G or ENV.sdarr==0 and self.keyPressing[7] and self.downing>=ENV.sddas then if self._20G or ENV.sdarr==0 and self.keyPressing[7] and self.downing>=ENV.sddas then
@@ -978,7 +978,6 @@ function Player:freshBlockGhost()
self.ghoY=self.ghoY-1 self.ghoY=self.ghoY-1
end end
end end
end
end end
function Player:freshBlockDelay(keepFreshTimeInEasyFresh) function Player:freshBlockDelay(keepFreshTimeInEasyFresh)
local ENV=self.gameEnv local ENV=self.gameEnv