+ if(isnew)
+ {
+ // calculate shot origin offset from gun alignment
+ float gunalign = autocvar_cl_gunalign;
+ if(gunalign != 1 && gunalign != 2 && gunalign != 4)
+ gunalign = 3; // default value
+ --gunalign;
+
+ self.beam_shotorigin = arc_shotorigin[gunalign];
+
+ // set other main attributes of the beam
+ self.draw = Draw_ArcBeam;
+ self.entremove = Remove_ArcBeam;
+ sound(self, CH_SHOTS_SINGLE, "weapons/lgbeam_fly.wav", VOL_BASE, ATTEN_NORM);
+
+ flash = spawn();
+ flash.owner = self;
+ flash.effects = EF_ADDITIVE | EF_FULLBRIGHT;
+ flash.drawmask = MASK_NORMAL;
+ flash.solid = SOLID_NOT;
+ setattachment(flash, self, "");
+ setorigin(flash, '0 0 0');
+
+ self.beam_muzzleentity = flash;
+ }
+ else
+ {
+ flash = self.beam_muzzleentity;
+ }
+