From 8de29b0a90f678b5398a36e652e7e9829c291d9a Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 25 Mar 2021 20:49:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AF=E9=99=8D=E4=B8=8D=E5=86=8D=E4=BD=BF?= =?UTF-8?q?=E5=9C=BA=E5=9C=B0=E6=97=8B=E8=BD=AC=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=97=8B=E8=BD=AC=E7=B3=BB=E7=BB=9F=E7=9A=84=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/kickList.lua | 7 +++---- parts/player/player.lua | 8 ++++---- parts/player/update.lua | 1 - 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/parts/kickList.lua b/parts/kickList.lua index 99650c09..63ba3f83 100644 --- a/parts/kickList.lua +++ b/parts/kickList.lua @@ -131,12 +131,11 @@ do local x,y=P.curX,P.curY if y==P.ghoY and((P:solid(x-1,y)or P:solid(x-1,y+1)))and(P:solid(x+2,y)or P:solid(x+2,y+1))then if P.sound then SFX.play("rotatekick",nil,P:getCenterX()*.15)end - local D=P.spinSeq%100*10+d - P.spinSeq=D - if D<100 then return end + P.spinSeq=P.spinSeq%100*10+d + if P.spinSeq<100 then return end for i=1,#OspinList do local L=OspinList[i] - if D==L[1]then + if P.spinSeq==L[1]then local id,dir=L[2],L[3] local bk=BLOCKS[id][dir] x,y=P.curX+L[4],P.curY+L[5] diff --git a/parts/player/player.lua b/parts/player/player.lua index 2b0aef06..7382340f 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -5,7 +5,7 @@ local Player={}--Player class local int,ceil,rnd=math.floor,math.ceil,math.random -local max,min,abs,modf=math.max,math.min,math.abs,math.modf +local max,min,modf=math.max,math.min,math.modf local ins,rem=table.insert,table.remove local resume,yield=coroutine.resume,coroutine.yield @@ -613,8 +613,8 @@ function Player.spin(P,d,ifpre) sfx="prerotate" elseif P:ifoverlap(icb,ix,iy+1)and P:ifoverlap(icb,ix-1,iy)and P:ifoverlap(icb,ix+1,iy)then sfx="rotatekick" - if abs(d)==1 then - P.fieldOff.va=P.fieldOff.va+d*P.gameEnv.shakeFX*6e-3 + if d==1 or d==3 then + P.fieldOff.va=P.fieldOff.va+(2-d)*P.gameEnv.shakeFX*6e-3 else P.fieldOff.va=P.fieldOff.va+P:getCenterX()*P.gameEnv.shakeFX*3e-3 end @@ -1889,7 +1889,7 @@ end function Player.act_rotLeft(P) if P.control and P.waiting==-1 and P.cur then P.ctrlCount=P.ctrlCount+1 - P:spin(-1) + P:spin(3) P.keyPressing[4]=false end end diff --git a/parts/player/update.lua b/parts/player/update.lua index aad70d2c..9b99af5d 100644 --- a/parts/player/update.lua +++ b/parts/player/update.lua @@ -253,7 +253,6 @@ function update.alive(P,dt) end if ENV.shakeFX then P.fieldOff.vy=ENV.shakeFX*.2 - P.fieldOff.va=P.fieldOff.va+P:getCenterX()*P.gameEnv.shakeFX*4e-5 end end else