From 010ce17455a3e30c0a521495fe5efadf9947793e Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 18 Dec 2014 01:55:56 +1100 Subject: [PATCH] Clean up flash handling a bit (was showing in some cases) --- qcsrc/common/weapons/w_arc.qc | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/qcsrc/common/weapons/w_arc.qc b/qcsrc/common/weapons/w_arc.qc index 895961995..6a1e4975b 100644 --- a/qcsrc/common/weapons/w_arc.qc +++ b/qcsrc/common/weapons/w_arc.qc @@ -1292,7 +1292,6 @@ void Ent_ReadArcBeam(float isnew) self.beam_muzzlelight[3] = 1; if(self.beam_muzzleeffect >= 0) { - self.beam_image = "particles/lgbeam"; setmodel(flash, "models/flash.md3"); flash.alpha = self.beam_alpha; flash.colormod = self.beam_color; @@ -1345,7 +1344,6 @@ void Ent_ReadArcBeam(float isnew) self.beam_image = "particles/lgbeam"; if(self.beam_muzzleeffect >= 0) { - self.beam_image = "particles/lgbeam"; setmodel(flash, "models/flash.md3"); flash.alpha = self.beam_alpha; flash.colormod = self.beam_color; @@ -1372,7 +1370,6 @@ void Ent_ReadArcBeam(float isnew) self.beam_image = "particles/lgbeam"; if(self.beam_muzzleeffect >= 0) { - self.beam_image = "particles/lgbeam"; setmodel(flash, "models/flash.md3"); flash.alpha = self.beam_alpha; flash.colormod = self.beam_color; @@ -1397,10 +1394,13 @@ void Ent_ReadArcBeam(float isnew) self.beam_muzzlelight[2] = 1; self.beam_muzzlelight[3] = 1; self.beam_image = "particles/lgbeam"; - setmodel(flash, "models/flash.md3"); - flash.alpha = self.beam_alpha; - flash.colormod = self.beam_color; - flash.scale = 0.5; + if(self.beam_muzzleeffect >= 0) + { + setmodel(flash, "models/flash.md3"); + flash.alpha = self.beam_alpha; + flash.colormod = self.beam_color; + flash.scale = 0.5; + } break; } case ARC_BT_BURST_WALL: @@ -1422,7 +1422,6 @@ void Ent_ReadArcBeam(float isnew) self.beam_image = "particles/lgbeam"; if(self.beam_muzzleeffect >= 0) { - self.beam_image = "particles/lgbeam"; setmodel(flash, "models/flash.md3"); flash.alpha = self.beam_alpha; flash.colormod = self.beam_color; @@ -1449,7 +1448,6 @@ void Ent_ReadArcBeam(float isnew) self.beam_image = "particles/lgbeam"; if(self.beam_muzzleeffect >= 0) { - self.beam_image = "particles/lgbeam"; setmodel(flash, "models/flash.md3"); flash.alpha = self.beam_alpha; flash.colormod = self.beam_color; @@ -1476,7 +1474,6 @@ void Ent_ReadArcBeam(float isnew) self.beam_image = "particles/lgbeam"; if(self.beam_muzzleeffect >= 0) { - self.beam_image = "particles/lgbeam"; setmodel(flash, "models/flash.md3"); flash.alpha = self.beam_alpha; flash.colormod = self.beam_color; @@ -1505,7 +1502,6 @@ void Ent_ReadArcBeam(float isnew) self.beam_image = "particles/lgbeam"; if(self.beam_muzzleeffect >= 0) { - self.beam_image = "particles/lgbeam"; setmodel(flash, "models/flash.md3"); flash.alpha = self.beam_alpha; flash.colormod = self.beam_color; -- 2.39.2