if(
!IS_PLAYER(own)
||
- (!thiswep.wr_checkammo1(thiswep, own, weaponentity) && !(own.items & IT_UNLIMITED_WEAPON_AMMO))
- ||
IS_DEAD(own)
||
- forbidWeaponUse(own)
+ !weapon_prepareattack_check(thiswep, own, weaponentity, this.beam_bursting, -1)
||
own.(weaponentity).m_switchweapon != WEP_ARC
||
{
// note: this doesn't force the switch
W_SwitchToOtherWeapon(own, weaponentity);
- own.(weaponentity).arc_BUTTON_ATCK_prev = false; // hax
}
+ own.(weaponentity).arc_BUTTON_ATCK_prev = false; // allow switching weapons
delete(this);
return;
}
W_SetupShot_Range(
own,
- weaponentity, // TODO
+ weaponentity,
true,
0,
SND_Null,
0,
WEP_CVAR(arc, beam_damage) * coefficient,
WEP_CVAR(arc, beam_range),
- WEP_ARC.m_id
+ thiswep.m_id
);
// After teleport, "lock" the beam until the teleport is confirmed.
(1 - (WEP_CVAR(arc, beam_returnspeed) * frametime)),
min(WEP_CVAR(arc, beam_maxangle) / angle, 1)
);
- this.beam_dir = normalize((w_shotdir * (1 - blendfactor)) + (this.beam_dir * blendfactor));
+ if(vdist(this.beam_dir - w_shotdir, <, 0.01))
+ this.beam_dir = w_shotdir;
+ else
+ this.beam_dir = normalize((w_shotdir * (1 - blendfactor)) + (this.beam_dir * blendfactor));
}
else
{
(1 - (WEP_CVAR(arc, beam_returnspeed) * frametime)),
1
);
- this.beam_dir = normalize((w_shotdir * (1 - blendfactor)) + (this.beam_dir * blendfactor));
+ if(vdist(this.beam_dir - w_shotdir, <, 0.01))
+ this.beam_dir = w_shotdir;
+ else
+ this.beam_dir = normalize((w_shotdir * (1 - blendfactor)) + (this.beam_dir * blendfactor));
}
// network information: beam direction
{
float roothealth = ((burst) ? WEP_CVAR(arc, burst_healing_hps) : WEP_CVAR(arc, beam_healing_hps));
float rootarmor = ((burst) ? WEP_CVAR(arc, burst_healing_aps) : WEP_CVAR(arc, beam_healing_aps));
- float hplimit = ((IS_PLAYER(trace_ent)) ? WEP_CVAR(arc, beam_healing_hmax) : 0);
+ float hplimit = ((IS_PLAYER(trace_ent)) ? WEP_CVAR(arc, beam_healing_hmax) : RESOURCE_LIMIT_NONE);
Heal(trace_ent, own, (roothealth * coefficient), hplimit);
if(IS_PLAYER(trace_ent) && rootarmor)
{
void Arc_Smoke(entity actor, .entity weaponentity)
{
makevectors(actor.v_angle);
- W_SetupShot_Range(actor,weaponentity,true,0,SND_Null,0,0,0,WEP_ARC.m_id); // TODO: probably doesn't need deathtype, since this is just a prefire effect
+ W_SetupShot_Range(actor,weaponentity,false,0,SND_Null,0,0,0,WEP_ARC.m_id); // TODO: probably doesn't need deathtype, since this is just a prefire effect
vector smoke_origin = w_shotorg + actor.velocity*frametime;
if ( actor.arc_overheat > time )
}
else if(fire & 2)
{
- if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(arc, bolt_refire)))
+ if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR(arc, bolt_refire)))
{
W_Arc_Attack_Bolt(thiswep, actor, weaponentity);
weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR(arc, bolt_refire), w_ready);