]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/main.qc
replicate autoreload and impulse fallback cvars
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qc
index df13ca7f62fad43879b6ba209b78153d2e4cc9b9..e32c0e8f57568bf4f63380368cab0570a2754874 100644 (file)
@@ -140,6 +140,9 @@ void CSQC_Init()
 
        registercvar("cl_spawn_near_teammate", "1");
 
+       registercvar("cl_weapon_switch_reload", "1");
+       registercvar("cl_weapon_switch_fallback_to_impulse", "1");
+
        if(autocvar_cl_lockview)
                cvar_set("cl_lockview", "0");
 
@@ -223,12 +226,14 @@ void Shutdown()
 
        localcmd("\ncl_hook_shutdown\n");
 
+       localcmd("\n-button14\n");
+
        deactivate_minigame();
        HUD_MinigameMenu_Close(NULL, NULL, NULL);
 }
 
 .float has_team;
-float SetTeam(entity o, int Team)
+bool SetTeam(entity o, int Team)
 {
        TC(int, Team);
        devassert_once(Team);
@@ -529,6 +534,7 @@ NET_HANDLE(ENT_CLIENT_CLIENTDATA, bool isnew)
                race_laptime = 0;
                race_checkpointtime = 0;
                hud_dynamic_shake_factor = -1;
+               spectatee_status_changed_time = time;
        }
        if (autocvar_hud_panel_healtharmor_progressbar_gfx)
        {
@@ -578,14 +584,14 @@ NET_HANDLE(ENT_CLIENT_NAGGER, bool isnew)
        {
                for(j = 0; j < maxclients; ++j)
                        if(playerslots[j])
-                               playerslots[j].ready = 1;
+                               playerslots[j].ready = true;
                for(i = 1; i <= maxclients; i += 8)
                {
                        f = ReadByte();
                        for(j = i-1, b = BIT(0); b < BIT(8); b <<= 1, ++j)
                                if (!(f & b))
                                        if(playerslots[j])
-                                               playerslots[j].ready = 0;
+                                               playerslots[j].ready = false;
                }
        }
 
@@ -606,7 +612,7 @@ NET_HANDLE(ENT_CLIENT_ELIMINATEDPLAYERS, bool isnew)
        if (sf & 1) {
                for (int j = 0; j < maxclients; ++j) {
                        if (playerslots[j]) {
-                               playerslots[j].eliminated = 1;
+                               playerslots[j].eliminated = true;
                        }
                }
                for (int i = 1; i <= maxclients; i += 8) {
@@ -616,7 +622,7 @@ NET_HANDLE(ENT_CLIENT_ELIMINATEDPLAYERS, bool isnew)
                                if (f & BIT(b)) continue;
                                int j = i - 1 + b;
                                if (playerslots[j]) {
-                                       playerslots[j].eliminated = 0;
+                                       playerslots[j].eliminated = false;
                                }
                        }
                }