From 4bfebdea13e6c01ea597632489b9c1890323da2c Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 10 Aug 2021 02:02:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E6=97=8B=E8=BD=AC=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=B8=8C=E6=9C=9B=E8=83=BD?= =?UTF-8?q?=E8=BF=9B=E4=B8=80=E6=AD=A5=E8=A7=A3=E5=86=B3=E7=A5=9E=E7=A7=98?= =?UTF-8?q?=E7=9A=84=E6=97=8B=E8=BD=AC=E6=97=B6=E6=8A=A5=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/player.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/parts/player/player.lua b/parts/player/player.lua index a0a3fb3f..c2e72983 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -678,26 +678,26 @@ function Player:spin(d,ifpre) end local icb=BLOCKS[cur.id][idir] local isc=self.RS.centerPos[cur.id][idir] - local ix,iy=self.curX+cur.sc[2]-isc[2],self.curY+cur.sc[1]-isc[1] + local baseX,baseY=self.curX+cur.sc[2]-isc[2],self.curY+cur.sc[1]-isc[1] for test=1,#kickData do - local x,y=ix+kickData[test][1],iy+kickData[test][2] - if (self.freshTime>0 or kickData[test][2]<=0)and not self:ifoverlap(icb,x,y)then - ix,iy=x,y - if self.gameEnv.moveFX and self.gameEnv.block then - self:createMoveFX() - end - self.curX,self.curY,cur.dir=ix,iy,idir - cur.sc,cur.bk=isc,icb + local ix,iy=baseX+kickData[test][1],baseY+kickData[test][2] + if (self.freshTime>0 or kickData[test][2]<=0)and not self:ifoverlap(icb,ix,iy)then + --Create moveFX at the original position + if self.gameEnv.moveFX and self.gameEnv.block then self:createMoveFX()end + + --Change block position + cur.sc,cur.bk,cur.dir=isc,icb,idir + self.curX,self.curY=ix,iy self.spinLast=test==2 and 0 or 1 + --Fresh ghost and freshTime local t=self.freshTime - if not ifpre then - self:freshBlock('move') - end + if not ifpre then self:freshBlock('move')end if kickData[test][2]>0 and self.freshTime==t and self.curY~=self.imgY then self.freshTime=self.freshTime-1 end + --Sound & Field shaking if self.sound then local sfx if ifpre then