软降不再使场地旋转,修复旋转系统的错误修改,整理代码
This commit is contained in:
@@ -131,12 +131,11 @@ do
|
|||||||
local x,y=P.curX,P.curY
|
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 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
|
if P.sound then SFX.play("rotatekick",nil,P:getCenterX()*.15)end
|
||||||
local D=P.spinSeq%100*10+d
|
P.spinSeq=P.spinSeq%100*10+d
|
||||||
P.spinSeq=D
|
if P.spinSeq<100 then return end
|
||||||
if D<100 then return end
|
|
||||||
for i=1,#OspinList do
|
for i=1,#OspinList do
|
||||||
local L=OspinList[i]
|
local L=OspinList[i]
|
||||||
if D==L[1]then
|
if P.spinSeq==L[1]then
|
||||||
local id,dir=L[2],L[3]
|
local id,dir=L[2],L[3]
|
||||||
local bk=BLOCKS[id][dir]
|
local bk=BLOCKS[id][dir]
|
||||||
x,y=P.curX+L[4],P.curY+L[5]
|
x,y=P.curX+L[4],P.curY+L[5]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
local Player={}--Player class
|
local Player={}--Player class
|
||||||
|
|
||||||
local int,ceil,rnd=math.floor,math.ceil,math.random
|
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 ins,rem=table.insert,table.remove
|
||||||
local resume,yield=coroutine.resume,coroutine.yield
|
local resume,yield=coroutine.resume,coroutine.yield
|
||||||
|
|
||||||
@@ -613,8 +613,8 @@ function Player.spin(P,d,ifpre)
|
|||||||
sfx="prerotate"
|
sfx="prerotate"
|
||||||
elseif P:ifoverlap(icb,ix,iy+1)and P:ifoverlap(icb,ix-1,iy)and P:ifoverlap(icb,ix+1,iy)then
|
elseif P:ifoverlap(icb,ix,iy+1)and P:ifoverlap(icb,ix-1,iy)and P:ifoverlap(icb,ix+1,iy)then
|
||||||
sfx="rotatekick"
|
sfx="rotatekick"
|
||||||
if abs(d)==1 then
|
if d==1 or d==3 then
|
||||||
P.fieldOff.va=P.fieldOff.va+d*P.gameEnv.shakeFX*6e-3
|
P.fieldOff.va=P.fieldOff.va+(2-d)*P.gameEnv.shakeFX*6e-3
|
||||||
else
|
else
|
||||||
P.fieldOff.va=P.fieldOff.va+P:getCenterX()*P.gameEnv.shakeFX*3e-3
|
P.fieldOff.va=P.fieldOff.va+P:getCenterX()*P.gameEnv.shakeFX*3e-3
|
||||||
end
|
end
|
||||||
@@ -1889,7 +1889,7 @@ end
|
|||||||
function Player.act_rotLeft(P)
|
function Player.act_rotLeft(P)
|
||||||
if P.control and P.waiting==-1 and P.cur then
|
if P.control and P.waiting==-1 and P.cur then
|
||||||
P.ctrlCount=P.ctrlCount+1
|
P.ctrlCount=P.ctrlCount+1
|
||||||
P:spin(-1)
|
P:spin(3)
|
||||||
P.keyPressing[4]=false
|
P.keyPressing[4]=false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -253,7 +253,6 @@ function update.alive(P,dt)
|
|||||||
end
|
end
|
||||||
if ENV.shakeFX then
|
if ENV.shakeFX then
|
||||||
P.fieldOff.vy=ENV.shakeFX*.2
|
P.fieldOff.vy=ENV.shakeFX*.2
|
||||||
P.fieldOff.va=P.fieldOff.va+P:getCenterX()*P.gameEnv.shakeFX*4e-5
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user