X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Farc.qc;fp=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Farc.qc;h=fc31db88754e76bc486b81fa24df7306d340718d;hp=c4c396fce597d44f796b826ccfebeb41a95a9307;hb=cdeed9b19ab431d579c81007ba58e7deb708f781;hpb=71eb8f743b4e5cb924087f07995a6ef3f2180861 diff --git a/qcsrc/common/weapons/weapon/arc.qc b/qcsrc/common/weapons/weapon/arc.qc index c4c396fce5..fc31db8875 100644 --- a/qcsrc/common/weapons/weapon/arc.qc +++ b/qcsrc/common/weapons/weapon/arc.qc @@ -208,25 +208,11 @@ void W_Arc_Beam_Think(entity this) 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 ) { @@ -249,8 +235,7 @@ void W_Arc_Beam_Think(entity this) 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); } } @@ -438,16 +423,9 @@ void W_Arc_Beam_Think(entity this) 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));