修复没开场地晃动时spin报错
This commit is contained in:
@@ -613,10 +613,12 @@ 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 d==1 or d==3 then
|
if P.gameEnv.shakeFX then
|
||||||
P.fieldOff.va=P.fieldOff.va+(2-d)*P.gameEnv.shakeFX*6e-3
|
if d==1 or d==3 then
|
||||||
else
|
P.fieldOff.va=P.fieldOff.va+(2-d)*P.gameEnv.shakeFX*6e-3
|
||||||
P.fieldOff.va=P.fieldOff.va+P:getCenterX()*P.gameEnv.shakeFX*3e-3
|
else
|
||||||
|
P.fieldOff.va=P.fieldOff.va+P:getCenterX()*P.gameEnv.shakeFX*3e-3
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
sfx="rotate"
|
sfx="rotate"
|
||||||
@@ -2024,7 +2026,6 @@ function Player.act_insDown(P)
|
|||||||
end
|
end
|
||||||
if ENV.shakeFX then
|
if ENV.shakeFX then
|
||||||
P.fieldOff.vy=ENV.shakeFX*.5
|
P.fieldOff.vy=ENV.shakeFX*.5
|
||||||
-- P.fieldOff.va=P.fieldOff.va+P:getCenterX()*P.gameEnv.shakeFX*5e-4
|
|
||||||
end
|
end
|
||||||
P.curY=P.ghoY
|
P.curY=P.ghoY
|
||||||
P.lockDelay=ENV.lock
|
P.lockDelay=ENV.lock
|
||||||
|
|||||||
Reference in New Issue
Block a user