diff --git a/parts/player/init.lua b/parts/player/init.lua index b4d32efc..98eb955e 100644 --- a/parts/player/init.lua +++ b/parts/player/init.lua @@ -330,6 +330,7 @@ local function applyGameEnv(P)--Finish gameEnv processing if ENV.clearFX==0 then ENV.clearFX=false end if ENV.splashFX==0 then ENV.splashFX=false end if ENV.shakeFX==0 then ENV.shakeFX=false end + if ENV.atkFX==0 then ENV.atkFX=false end end if ENV.ghost==0 then ENV.ghost=false end if ENV.center==0 then ENV.center=false end diff --git a/parts/player/player.lua b/parts/player/player.lua index 455ee57b..7d3b8019 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -97,7 +97,7 @@ end function Player:createClearingFX(y,spd) ins(self.clearFX,{y,0,spd}) end -function Player:createBeam(R,send,color) +function Player:createBeam(R,send,power,color) local x1,y1,x2,y2 if self.mini then x1,y1=self.centerX,self.centerY else x1,y1=self.x+(30*(self.curX+self.cur.sc[2])-30+15+150)*self.size,self.y+(600-30*(self.curY+self.cur.sc[1])+15)*self.size @@ -110,7 +110,7 @@ function Player:createBeam(R,send,color) local r,g,b=c[1]*2,c[2]*2,c[3]*2 local a=GAME.modeEnv.royaleMode and not(self.type=="human"or R.type=="human")and .2 or 1 - SYSFX.newAttack(1-SETTING.atkFX*.1,x1,y1,x2,y2,int(send^.7*(4+SETTING.atkFX)),r,g,b,a*(SETTING.atkFX+2)*.0626) + SYSFX.newAttack(1-power*.1,x1,y1,x2,y2,int(send^.7*(4+power)),r,g,b,a*(power+2)*.0626) end ---------------------------------------------------- @@ -1322,8 +1322,8 @@ do--Player.drop(self)--Place piece if M>0 then for i=1,M do self:attack(self.atker[i],send,sendTime,generateLine(self:RND(10))) - if SETTING.atkFX>0 then - self:createBeam(self.atker[i],send,C.color) + if ENV.atkFX then + self:createBeam(self.atker[i],send,ENV.atkFX,C.color) end end else @@ -1338,8 +1338,8 @@ do--Player.drop(self)--Place piece end if T then self:attack(T,send,sendTime,generateLine(self:RND(10))) - if SETTING.atkFX>0 then - self:createBeam(T,send,C.color) + if ENV.atkFX then + self:createBeam(T,send,ENV.atkFX,C.color) end end end diff --git a/parts/player/update.lua b/parts/player/update.lua index c00c9e76..4a38f92e 100644 --- a/parts/player/update.lua +++ b/parts/player/update.lua @@ -398,8 +398,8 @@ function update.remote_alive(P,dt) for i=1,#L do if L[i].sid==sid then P:attack(L[i],amount,time,line,true) - if SETTING.atkFX>0 then - P:createBeam(L[i],amount,P.cur.color) + if P.gameEnv.atkFX then + P:createBeam(L[i],amount,P.gameEnv.atkFX,P.cur.color) end break end