]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/arc.qc
Tidy up classnames
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / arc.qc
index 5f79c8ccfa58d622c4607dc5129e73783399b103..848825f147dc7b6d4bcd860dd9e5f55f5a4fe33f 100644 (file)
@@ -1,8 +1,8 @@
 #include "arc.qh"
 
 #ifdef SVQC
-#include <common/gamemodes/gamemode/onslaught/sv_onslaught.qh>
 #include <common/gamemodes/gamemode/onslaught/sv_generator.qh>
+#include <common/gamemodes/gamemode/onslaught/sv_onslaught.qh>
 
 bool W_Arc_Beam_Send(entity this, entity to, int sf)
 {
@@ -186,11 +186,14 @@ 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)
                ||
+               game_stopped
+               ||
                !weapon_prepareattack_check(thiswep, own, weaponentity, this.beam_bursting, -1)
                ||
                own.(weaponentity).m_switchweapon != WEP_ARC
@@ -931,9 +934,7 @@ void Draw_ArcBeam(entity this)
                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';
@@ -1200,7 +1201,7 @@ NET_HANDLE(ENT_CLIENT_ARC_BEAM, bool isnew)
                this.move_time = time;
                loopsound(this, CH_SHOTS_SINGLE, SND_ARC_LOOP, VOL_BASE, ATTEN_NORM);
 
-               flash = spawn();
+               flash = new(arc_flash);
                flash.owner = this;
                flash.effects = EF_ADDITIVE | EF_FULLBRIGHT;
                //flash.drawmask = MASK_NORMAL;