Weapon thiswep = WEP_ARC;
// TODO: use standard weapon use checks here!
- if(
- !IS_PLAYER(own)
- ||
- IS_DEAD(own)
- ||
- STAT(FROZEN, own)
- ||
- game_stopped
- ||
- !weapon_prepareattack_check(thiswep, own, weaponentity, this.beam_bursting, -1)
- ||
- own.(weaponentity).m_switchweapon != WEP_ARC
- ||
- (!PHYS_INPUT_BUTTON_ATCK(own) && !burst )
- ||
- own.vehicle
- ||
- (WEP_CVAR(arc, overheat_max) > 0 && this.beam_heat >= WEP_CVAR(arc, overheat_max))
- )
+ if(!IS_PLAYER(own) || IS_DEAD(own) || STAT(FROZEN, own) || game_stopped || own.vehicle
+ || !weapon_prepareattack_check(thiswep, own, weaponentity, this.beam_bursting, -1)
+ || own.(weaponentity).m_switchweapon != WEP_ARC
+ || (!PHYS_INPUT_BUTTON_ATCK(own) && !burst)
+ || (WEP_CVAR(arc, overheat_max) > 0 && this.beam_heat >= WEP_CVAR(arc, overheat_max)) )
{
if ( WEP_CVAR(arc, cooldown) > 0 )
{
if ( WEP_CVAR(arc, overheat_max) > 0 && this.beam_heat >= WEP_CVAR(arc, overheat_max) )
{
- Send_Effect(EFFECT_ARC_OVERHEAT,
- this.beam_start, this.beam_wantdir, 1 );
+ Send_Effect(EFFECT_ARC_OVERHEAT, this.beam_start, this.beam_wantdir, 1);
sound(this, CH_WEAPON_A, SND_ARC_STOP, VOL_BASE, ATTN_NORM);
}
}
beam_endpos = WarpZone_TransformOrigin(WarpZone_trace_transform, beam_endpos);
new_dir = WarpZone_TransformVelocity(WarpZone_trace_transform, new_dir);
- bool is_player = (
- IS_PLAYER(trace_ent)
- ||
- trace_ent.classname == "body"
- ||
- IS_MONSTER(trace_ent)
- );
-
if(trace_ent)
{
+ bool is_player = (IS_PLAYER(trace_ent) || trace_ent.classname == "body" || IS_MONSTER(trace_ent));
if(SAME_TEAM(own, trace_ent))
{
float roothealth = ((burst) ? WEP_CVAR(arc, burst_healing_hps) : WEP_CVAR(arc, beam_healing_hps));