From 1bf20a3217b94100370da9d5673359ece58e0971 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 16 Apr 2021 20:47:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=81=94=E7=BD=91=E5=AF=B9?= =?UTF-8?q?=E6=88=98=E7=9A=84=E6=94=BB=E5=87=BB=E5=8A=A8=E7=94=BB=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/player.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/parts/player/player.lua b/parts/player/player.lua index 7dadb01b..39d33c9f 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -336,6 +336,7 @@ function Player:ifoverlap(bk,x,y) end end function Player:attack(R,send,time,line,fromStream) + local atkFX=self.gameEnv.atkFX if GAME.net then if self.type=="human"then--Local player attack others ins(GAME.rep,GAME.frame) @@ -346,6 +347,9 @@ function Player:attack(R,send,time,line,fromStream) line*0x100000000+ 0x2000000000000 ) + if atkFX then + self:createBeam(R,send,atkFX,self.cur.color) + end end if fromStream and R.type=="human"then--Local player receiving lines ins(GAME.rep,GAME.frame) @@ -360,6 +364,9 @@ function Player:attack(R,send,time,line,fromStream) end else R:receive(self,send,time,line) + if atkFX then + self:createBeam(R,send,atkFX,self.cur.color) + end end end function Player:receive(A,send,time,line) @@ -1328,9 +1335,6 @@ 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 ENV.atkFX then - self:createBeam(self.atker[i],send,ENV.atkFX,C.color) - end end else T=randomTarget(self) @@ -1344,9 +1348,6 @@ do--Player.drop(self)--Place piece end if T then self:attack(T,send,sendTime,generateLine(self:RND(10))) - if ENV.atkFX then - self:createBeam(T,send,ENV.atkFX,C.color) - end end end if self.sound and send>3 then SFX.play("emit",min(send,7)*.1)end