X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fmain.qc;h=7ad10879f7ac23b05a69a96ae7d4f7441ea51c2d;hb=e98ed192eac2c7983d5395418f3e9396024fa9ba;hp=479dd7e8eab8486ed14e23b1b333a58df3a1ac59;hpb=ea21cf9661f922f64dd6cc698f3aa717bb70c3ab;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 479dd7e8e..7ad10879f 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -1,8 +1,10 @@ #include "main.qh" +#include "defs.qh" +#include #include "miscfunctions.qh" #include -#include +#include #include #include #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();