]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/main.qc
Merged Lyberta/GivePlayerAmmo into Lyberta/RandomStartWeapons.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qc
index 479dd7e8eab8486ed14e23b1b333a58df3a1ac59..7ad10879f7ac23b05a69a96ae7d4f7441ea51c2d 100644 (file)
@@ -1,8 +1,10 @@
 #include "main.qh"
 
+#include "defs.qh"
+#include <common/ent_cs.qh>
 #include "miscfunctions.qh"
 #include <common/effects/effect.qh>
-#include <common/effects/qc/all.qh>
+#include <common/effects/qc/_mod.qh>
 #include <common/effects/all.qh>
 #include <common/effects/all.inc>
 #include "hud/_mod.qh"
@@ -150,6 +152,9 @@ void CSQC_Init()
 
        GetTeam(NUM_SPECTATOR, true); // add specs first
 
+       for (int w = 0; w <= WEP_LAST - WEP_FIRST; ++w)
+               weapon_accuracy[w] = -1;
+
        // precaches
 
        if(autocvar_cl_reticle)
@@ -491,9 +496,9 @@ NET_HANDLE(ENT_CLIENT_CLIENTDATA, bool isnew)
 
     int f = ReadByte();
 
-       scoreboard_showscores_force = (f & 1);
+       scoreboard_showscores_force = (f & BIT(0));
 
-       if(f & 2)
+       if(f & BIT(1))
        {
                newspectatee_status = ReadByte();
                if(newspectatee_status == player_localnum + 1)
@@ -502,9 +507,9 @@ NET_HANDLE(ENT_CLIENT_CLIENTDATA, bool isnew)
        else
                newspectatee_status = 0;
 
-       spectatorbutton_zoom = (f & 4);
+       spectatorbutton_zoom = (f & BIT(2));
 
-       if(f & 16)
+       if(f & BIT(4))
        {
                num_spectators = ReadByte();