+void Arc_Smoke()
+{
+ makevectors(self.v_angle);
+ W_SetupShot_Range(self,true,0,"",0,0,0);
+
+ vector smoke_origin = w_shotorg + self.velocity*frametime;
+ if ( self.arc_overheat > time )
+ {
+ if ( random() < self.arc_heat_percent )
+ pointparticles( particleeffectnum("arc_smoke"), smoke_origin, '0 0 0', 1 );
+ if ( self.BUTTON_ATCK || self.BUTTON_ATCK2 )
+ {
+ pointparticles( particleeffectnum("arc_overheat_fire"), smoke_origin, w_shotdir, 1 );
+ if ( !self.arc_smoke_sound )
+ {
+ self.arc_smoke_sound = 1;
+ sound(self, CH_SHOTS_SINGLE, "weapons/arc_loop_overheat.wav", VOL_BASE, ATTN_NORM);
+ }
+ }
+ }
+ else if ( self.arc_beam && WEP_CVAR(arc, overheat_max) > 0 &&
+ self.arc_beam.beam_heat > WEP_CVAR(arc, overheat_min) )
+ {
+ if ( random() < (self.arc_beam.beam_heat-WEP_CVAR(arc, overheat_min)) /
+ ( WEP_CVAR(arc, overheat_max)-WEP_CVAR(arc, overheat_min) ) )
+ pointparticles( particleeffectnum("arc_smoke"), smoke_origin, '0 0 0', 1 );
+ }
+
+ if ( self.arc_smoke_sound && ( self.arc_overheat <= time ||
+ !( self.BUTTON_ATCK || self.BUTTON_ATCK2 ) ) || self.switchweapon != WEP_ARC )
+ {
+ self.arc_smoke_sound = 0;
+ sound(self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, ATTEN_NORM);
+ }
+}
+