From: Mario Date: Wed, 17 Dec 2014 14:55:56 +0000 (+1100) Subject: Clean up flash handling a bit (was showing in some cases) X-Git-Tag: xonotic-v0.8.0~60^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=010ce17455a3e30c0a521495fe5efadf9947793e;p=xonotic%2Fxonotic-data.pk3dir.git Clean up flash handling a bit (was showing in some cases) --- 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;