From 46d95b33e4d30d8648e1ad633701e3e2d17fbb9e Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 23 Dec 2021 13:19:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=AD=E6=94=BE=E7=AB=8B=E4=BD=93=E5=A3=B0?= =?UTF-8?q?=E9=9F=B3=E6=95=88=E9=99=90=E5=88=B6=E8=BE=93=E5=85=A5=E5=80=BC?= =?UTF-8?q?=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/sfx.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Zframework/sfx.lua b/Zframework/sfx.lua index a1f90819..8f5c5c20 100644 --- a/Zframework/sfx.lua +++ b/Zframework/sfx.lua @@ -1,5 +1,6 @@ local type,rem=type,table.remove local int,rnd=math.floor,math.random +local interval=MATH.interval local sfxList={} local packSetting={} @@ -140,7 +141,7 @@ local function _play(name,vol,pos,pitch) S=S[n]--AU_SRC if S:getChannelCount()==1 then if pos then - pos=pos*stereo + pos=interval(pos,-1,1)*stereo S:setPosition(pos,1-pos^2,0) else S:setPosition(0,0,0)