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