}
if(sf & ARC_SF_BEAMDIR) // beam direction
{
- WriteAngle(MSG_ENTITY, this.beam_dir.x);
- WriteAngle(MSG_ENTITY, this.beam_dir.y);
- WriteAngle(MSG_ENTITY, this.beam_dir.z);
+ WriteAngleVector(MSG_ENTITY, this.beam_dir);
}
if(sf & ARC_SF_BEAMTYPE) // beam type
{
W_SetupShot(actor, weaponentity, false, 2, SND_LASERGUN_FIRE, CH_WEAPON_A, WEP_CVAR(arc, bolt_damage), WEP_ARC.m_id | HITTYPE_SECONDARY);
- Send_Effect(EFFECT_ARC_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
+ W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir);
missile = new(missile);
missile.owner = missile.realowner = actor;
Send_Effect(EFFECT_ARC_SMOKE, smoke_origin, '0 0 0', 1 );
}
- if ( actor.arc_smoke_sound && ( actor.arc_overheat <= time ||
- !( PHYS_INPUT_BUTTON_ATCK(actor) || PHYS_INPUT_BUTTON_ATCK2(actor) ) ) || actor.(weaponentity).m_switchweapon != thiswep )
+ bool attacking = PHYS_INPUT_BUTTON_ATCK(actor) || PHYS_INPUT_BUTTON_ATCK2(actor);
+ bool stop_smoke_sound = actor.arc_overheat <= time || !attacking;
+ if ((actor.arc_smoke_sound && stop_smoke_sound) || actor.(weaponentity).m_switchweapon != thiswep)
{
actor.arc_smoke_sound = 0;
sound(actor, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, ATTEN_NORM);
Draw_CylindricLine(start, end, thickness, beam.beam_image, 0.25, -time * 3, beam.beam_color, beam.beam_alpha, DRAWFLAG_NORMAL, transformed_view_org);
else
{
- R_BeginPolygon(beam.beam_image, DRAWFLAG_NORMAL); // DRAWFLAG_ADDITIVE
+ R_BeginPolygon(beam.beam_image, DRAWFLAG_NORMAL, false); // DRAWFLAG_ADDITIVE
R_PolygonVertex(
top,
'0 0.5 0' + ('0 0.5 0' * (thickness / beam.beam_thickness)),
MAKE_VECTORS(myviewangle, forward, right, up);
entity wepent = viewmodels[this.beam_slot];
- if(autocvar_chase_active)
- this.beam_usevieworigin = 1;
- else
- this.beam_usevieworigin = 2;
+ this.beam_usevieworigin = (autocvar_chase_active) ? 1 : 2;
// decide upon start position
if(this.beam_usevieworigin == 2)
if(!v_shot_idx || this.beam_usevieworigin != 2)
{
this.beam_shotorigin = wepent.movedir;
- origin_offset =
- right * -this.beam_shotorigin.y
- + up * this.beam_shotorigin.z;
+ origin_offset = right * -this.beam_shotorigin.y + up * this.beam_shotorigin.z;
}
else
this.beam_shotorigin = '0 0 0';
if(ReadByte())
{
- if(autocvar_chase_active)
- { this.beam_usevieworigin = 1; }
- else // use view origin
- { this.beam_usevieworigin = 2; }
+ this.beam_usevieworigin = (autocvar_chase_active) ? 1 : 2;
}
else
{
if(sf & ARC_SF_BEAMDIR) // beam direction
{
- this.angles_x = ReadAngle();
- this.angles_y = ReadAngle();
- this.angles_z = ReadAngle();
+ this.angles = ReadAngleVector();
}
if(sf & ARC_SF_BEAMTYPE) // beam type