修复旋转时场地晃动的逻辑会跟玩家sound有关

This commit is contained in:
MrZ626
2021-08-21 01:15:54 +08:00
parent 8671b52cbb
commit b7b94ca900
2 changed files with 28 additions and 28 deletions

View File

@@ -624,22 +624,22 @@ do
P.freshTime=P.freshTime-1
end
if P.sound then
local sfx
if ifpre then
sfx='prerotate'
elseif P:ifoverlap(icb,x,y+1)and P:ifoverlap(icb,x-1,y)and P:ifoverlap(icb,x+1,y)then
sfx='rotatekick'
if P.gameEnv.shakeFX then
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
local sfx
if ifpre then
sfx='prerotate'
elseif P:ifoverlap(icb,x,y+1)and P:ifoverlap(icb,x-1,y)and P:ifoverlap(icb,x+1,y)then
sfx='rotatekick'
if P.gameEnv.shakeFX then
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
else
sfx='rotate'
end
else
sfx='rotate'
end
if P.sound then
SFX.play(sfx,nil,P:getCenterX()*.15)
end
P.stat.rotate=P.stat.rotate+1