Autocvarize SVQC and CSQC. 20% less CPU usage of dedicated servers with bots. Large...
authorRudolf Polzer <divverent@alientrap.org>
Sat, 4 Dec 2010 15:21:48 +0000 (16:21 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 4 Dec 2010 15:22:14 +0000 (16:22 +0100)
108 files changed:
qcsrc/autocvarize-update.sh [new file with mode: 0755]
qcsrc/autocvarize.pl [new file with mode: 0644]
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/client/bgmscript.qc
qcsrc/client/casings.qc
qcsrc/client/effects.qc
qcsrc/client/gibs.qc
qcsrc/client/hook.qc
qcsrc/client/hud.qc
qcsrc/client/mapvoting.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/particles.qc
qcsrc/client/scoreboard.qc
qcsrc/client/target_music.qc
qcsrc/client/teamradar.qc
qcsrc/client/tuba.qc
qcsrc/client/wall.qc
qcsrc/client/waypointsprites.qc
qcsrc/server/anticheat.qc
qcsrc/server/arena.qc
qcsrc/server/autocvars.qh
qcsrc/server/bot/aim.qc
qcsrc/server/bot/bot.qc
qcsrc/server/bot/havocbot/havocbot.qc
qcsrc/server/bot/havocbot/role_ctf.qc
qcsrc/server/bot/havocbot/role_keyhunt.qc
qcsrc/server/bot/havocbot/role_onslaught.qc
qcsrc/server/bot/havocbot/roles.qc
qcsrc/server/bot/navigation.qc
qcsrc/server/bot/scripting.qc
qcsrc/server/bot/waypoints.qc
qcsrc/server/campaign.qc
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_impulse.qc
qcsrc/server/cl_physics.qc
qcsrc/server/cl_player.qc
qcsrc/server/cl_weapons.qc
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/clientcommands.qc
qcsrc/server/ctf.qc
qcsrc/server/defs.qh
qcsrc/server/domination.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_subs.qc
qcsrc/server/g_triggers.qc
qcsrc/server/g_world.qc
qcsrc/server/gamecommand.qc
qcsrc/server/ipban.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mode_onslaught.qc
qcsrc/server/monsters/m_monsters.qc
qcsrc/server/monsters/monster_zombie.qc
qcsrc/server/mutators/gamemode_freezetag.qc
qcsrc/server/mutators/gamemode_keepaway.qc
qcsrc/server/mutators/gamemode_keyhunt.qc
qcsrc/server/mutators/mutator_dodging.qc
qcsrc/server/mutators/mutator_nix.qc
qcsrc/server/nexball.qc
qcsrc/server/playerstats.qc
qcsrc/server/portals.qc
qcsrc/server/race.qc
qcsrc/server/runematch.qc
qcsrc/server/scores.qc
qcsrc/server/scores_rules.qc
qcsrc/server/sv_main.qc
qcsrc/server/t_items.qc
qcsrc/server/t_jumppads.qc
qcsrc/server/t_plats.qc
qcsrc/server/t_quake3.qc
qcsrc/server/t_teleporters.qc
qcsrc/server/teamplay.qc
qcsrc/server/tturrets/system/system_damage.qc
qcsrc/server/tturrets/system/system_main.qc
qcsrc/server/tturrets/units/unit_ewheel.qc
qcsrc/server/tturrets/units/unit_hellion.qc
qcsrc/server/tturrets/units/unit_hk.qc
qcsrc/server/tturrets/units/unit_machinegun.qc
qcsrc/server/tturrets/units/unit_phaser.qc
qcsrc/server/tturrets/units/unit_targettrigger.qc
qcsrc/server/tturrets/units/unit_walker.qc
qcsrc/server/vehicles/racer.qc
qcsrc/server/vehicles/raptor.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/vote.qc
qcsrc/server/w_campingrifle.qc
qcsrc/server/w_common.qc
qcsrc/server/w_crylink.qc
qcsrc/server/w_electro.qc
qcsrc/server/w_fireball.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_hagar.qc
qcsrc/server/w_hlac.qc
qcsrc/server/w_hook.qc
qcsrc/server/w_laser.qc
qcsrc/server/w_minelayer.qc
qcsrc/server/w_minstanex.qc
qcsrc/server/w_nex.qc
qcsrc/server/w_porto.qc
qcsrc/server/w_rocketlauncher.qc
qcsrc/server/w_seeker.qc
qcsrc/server/w_shotgun.qc
qcsrc/server/w_tuba.qc
qcsrc/server/w_uzi.qc
qcsrc/server/waypointsprites.qc

diff --git a/qcsrc/autocvarize-update.sh b/qcsrc/autocvarize-update.sh
new file mode 100755 (executable)
index 0000000..31ecc08
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -ex
+git checkout divVerent/autocvarizer_test
+trap 'git reset --hard; git checkout divVerent/autocvarizer' EXIT
+trap 'exit 1' INT
+git merge --no-commit -s ours divVerent/autocvarizer
+git read-tree -m -u divVerent/autocvarizer # "theirs"
+find server \( -type f -a \( -name \*.c -o -name \*.qc -o -name \*.h -o -name \*.qh \) \) -print0 | AUTOCVARING_SVQC=1 xargs -0 perl autocvarize.pl > server/autocvars.qh.new
+diff -Nu server/autocvars.qh server/autocvars.qh.new || true
+mv server/autocvars.qh.new server/autocvars.qh
+find client \( -type f -a \( -name \*.c -o -name \*.qc -o -name \*.h -o -name \*.qh \) \) -print0 | xargs -0 perl autocvarize.pl > client/autocvars.qh.new
+diff -Nu client/autocvars.qh client/autocvars.qh.new || true
+mv client/autocvars.qh.new client/autocvars.qh
+if make -C .. FTEQCC=../../../../fteqcc/fteqcc.bin FTEQCCFLAGS=; then
+       echo "Commit? ^C to not"
+       read -r L
+       git add server/autocvars.qh
+       git add client/autocvars.qh
+       git commit -a
+else
+       echo "FAILED. Exit this shell when done examining."
+       sh -i
+fi
diff --git a/qcsrc/autocvarize.pl b/qcsrc/autocvarize.pl
new file mode 100644 (file)
index 0000000..7ac048a
--- /dev/null
@@ -0,0 +1,281 @@
+#!/usr/bin/perl
+# this tool generates JUST the autocvar declarations for cvars
+use strict;
+use warnings;
+
+my @files = @ARGV;
+
+my %cvars = ();
+my %old = ();
+my %menu = ();
+my %defaults = ();
+
+sub found($$$$)
+{
+       my ($name, $type, $default, $force) = @_;
+       if(length $name >= 55)
+       {
+               warn "cvar $name is a Dr. honorificabilitudinitatibis causa BRLOGENSHFEGLE";
+               $type = 'cvar_toolong';
+               return;
+       }
+#      $old{$name} = 1
+#              if $force;
+#      $menu{$name} = 1
+#              if $force > 1;
+       if(exists $cvars{$name} and not defined $cvars{name})
+       {
+               # have already warned
+       }
+       elsif(exists $cvars{$name} and $type ne $cvars{$name})
+       {
+               warn "cvar $name used with different types";
+               if($force)
+               {
+                       $defaults{$name} = $default;
+                       $cvars{$name} = $type;
+               }
+               else
+               {
+                       undef $cvars{$name}
+                               unless $old{$name};
+               }
+               return;
+       }
+       elsif(exists $cvars{$name} and exists $defaults{$name} and $default ne $defaults{$name})
+       {
+               warn "cvar $name used with different defaults";
+               if($force)
+               {
+                       $defaults{$name} = $default;
+                       $cvars{$name} = $type;
+               }
+               else
+               {
+                       undef $cvars{$name}
+                               unless $old{$name};
+               }
+       }
+       else
+       {
+               $defaults{$name} = $default;
+               $cvars{$name} = $type;
+       }
+}
+
+for my $f(@files)
+{
+       print STDERR "In file $f\n";
+       open my $fh, "<", $f;
+       while(<$fh>)
+       {
+               chomp;
+               if(/^\/\/#NO AUTOCVARS START/ .. /^\/\/#NO AUTOCVARS END/)
+               {
+                       next;
+               }
+               s/\/\/.*//;
+               if(/^(?:var )?float autocvar_(\w+);$/)
+               {
+                       found $1, 'cvar', 0, 1;
+                       next;
+               }
+               if(/^var float autocvar_(\w+) = (.*);$/)
+               {
+                       found $1, 'cvar', $2, 1;
+                       next;
+               }
+               if(/^(?:var )?vector autocvar_(\w+);$/)
+               {
+                       found $1, 'cvar_vector', "0 0 0", 1;
+                       next;
+               }
+               if(/^var vector autocvar_(\w+) = '(.*)';$/)
+               {
+                       found $1, 'cvar_vector', $2, 1;
+                       next;
+               }
+               if(/^(?:var )?string autocvar_(\w+);$/)
+               {
+                       found $1, 'cvar_string', "", 1;
+                       next;
+               }
+               if(/^var string autocvar_(\w+) = "(.*)";$/)
+               {
+                       found $1, 'cvar_string', $2, 1;
+                       next;
+               }
+               if(/^#define autocvar_(\w+) cvar("\1")$/)
+               {
+                       found $1, 'cvar', 0, 2;
+                       next;
+               }
+               if(/^#define autocvar_(\w+) cvar_or("\1", (.*))$/)
+               {
+                       found $1, 'cvar', $1, 2;
+                       next;
+               }
+               if(/^#define autocvar_(\w+) cvar_string("\1")$/)
+               {
+                       found $1, 'cvar_string', "", 2;
+                       next;
+               }
+               while(/\bcvar\s*\(\s*"(\w+)"\s*\)/g)
+               {
+                       found $1, 'cvar', 0, 0;
+               }
+               while(/\bcvar_string\s*\(\s*"(\w+)"\s*\)/g)
+               {
+                       found $1, 'cvar_string', "", 0;
+               }
+               while(/\bcvar_vector\s*\(\s*"(\w+)"\s*\)/g)
+               {
+                       found $1, 'cvar_vector', "0 0 0", 0;
+               }
+               while(/\bcvar_or\s*\(\s*"(\w+)"\s*,\s*([^\s)]+)\s*\)/g)
+               {
+                       found $1, 'cvar', $2, 0;
+               }
+       }
+}
+
+if($ENV{AUTOCVARING_SVQC})
+{
+       for my $f(<menu/xonotic/*.c>)
+       {
+               print STDERR "In file $f\n";
+               open my $fh, "<", $f;
+               while(<$fh>)
+               {
+                       for(/"([^"]*)"/g)
+                       {
+                               $menu{$1} = 1;
+                       }
+               }
+       }
+
+       for my $f(<../maps/campaign*.txt>)
+       {
+               print STDERR "In file $f\n";
+               open my $fh, "<", $f;
+               while(<$fh>)
+               {
+                       for(/\b(.+?)\b/g)
+                       {
+                               $menu{$1} = 1;
+                       }
+               }
+       }
+}
+
+for my $name(sort keys %cvars)
+{
+       my $type = $cvars{$name};
+       my $menu = $menu{$name};
+       my $default = $defaults{$name};
+       die "wtf" if $name =~ /\0/;
+       if(not defined $type)
+       {
+               print "// cannot declare $name, it is used with different types\n";
+       }
+       elsif($type eq 'cvar_toolong')
+       {
+               print "// cannot declare $name, name is too long\n";
+       }
+       elsif($type eq 'cvar' and not $menu and $default eq "0")
+       {
+               print "float autocvar_$name;\n";
+       }
+       elsif($type eq 'cvar' and not $menu and $default ne "0")
+       {
+               print "var float autocvar_$name = $default;\n";
+       }
+       elsif($type eq 'cvar_vector' and not $menu and $default eq "0 0 0")
+       {
+               print "vector autocvar_$name;\n";
+       }
+       elsif($type eq 'cvar_vector' and not $menu and $default ne "0 0 0")
+       {
+               print "var vector autocvar_$name = '$default';\n";
+       }
+       elsif($type eq 'cvar_string' and not $menu and $default eq "")
+       {
+               print "string autocvar_$name;\n";
+       }
+       elsif($type eq 'cvar_string' and not $menu and $default ne "")
+       {
+               print "var string autocvar_$name = \"$default\";\n";
+       }
+       elsif($type eq 'cvar' and $menu and $default eq "0")
+       {
+               print "#define autocvar_$name cvar(\"$name\")\n";
+       }
+       elsif($type eq 'cvar' and $menu and $default ne "0")
+       {
+               print "#define autocvar_$name cvar_or(\"$name\", \"$default\")\n";
+       }
+       elsif($type eq 'cvar_string' and $menu) # sorry, no cvar_or for these
+       {
+               print "#define autocvar_$name cvar_string(\"$name\")\n";
+       }
+       elsif($type eq 'cvar_vector' and $menu) # sorry, no cvar_or for these
+       {
+               print "#define autocvar_$name cvar_vector(\"$name\")\n";
+       }
+}
+
+for my $f(@files)
+{
+       print STDERR "In file $f\n";
+       open my $fh, "<", $f;
+       my $out = "";
+       while(<$fh>)
+       {
+               chomp;
+               if(/^\/\/#NO AUTOCVARS START/ .. /^\/\/#NO AUTOCVARS END/)
+               {
+                       $out .= "$_\n";
+                       next;
+               }
+               if(/^(?:var )?float autocvar_(.*);$/)
+               {
+                       $out .= "$_\n";
+                       next;
+               }
+               if(/^(?:var )?string autocvar_(.*);$/)
+               {
+                       $out .= "$_\n";
+                       next;
+               }
+               if(/^#define autocvar_(.*) cvar/)
+               {
+                       $out .= "$_\n";
+                       next;
+               }
+               s{\b(cvar|cvar_string|cvar_vector|cvar_or)\s*\(\s*"([^"]+)"\s*(?:,\s*[^\s)]+\s*)?\)}{
+                       my ($type, $name) = ($1, $2);
+                       $type = 'cvar' if $type eq 'cvar_or';
+                       my $realtype = $cvars{$name};
+                       my $r = $&;
+                       if(defined $realtype)
+                       {
+                               #$r = "$realtype(\"$name\")";
+                               $r = "autocvar_$name";
+                               if($type eq 'cvar' && $realtype eq 'cvar_string')
+                               {
+                                       $r = "stof($r)";
+                               }
+                               if($type eq 'cvar_string' && $realtype eq 'cvar')
+                               {
+                                       $r = "ftos($r)";
+                               }
+                       }
+                       $r;
+               }ge;
+               $out .= "$_\n";
+       }
+       close $fh;
+       open $fh, ">", $f;
+       print $fh $out;
+       close $fh;
+}
index 24b230c..435deda 100644 (file)
@@ -140,11 +140,11 @@ void CSQC_Init(void)
        GibSplash_Precache();
        Casings_Precache();
        DamageInfo_Precache();
-       if(cvar_string("cl_announcer") != cl_announcer_prev) {
+       if(autocvar_cl_announcer != cl_announcer_prev) {
                Announcer_Precache();
                if(cl_announcer_prev)
                        strunzone(cl_announcer_prev);
-               cl_announcer_prev = strzone(cvar_string("cl_announcer"));
+               cl_announcer_prev = strzone(autocvar_cl_announcer);
        }
        Tuba_Precache();
 
@@ -186,7 +186,7 @@ void CSQC_Shutdown(void)
        remove(players);
        db_close(binddb);
        db_close(tempdb);
-       if(cvar("cl_db_saveasdump"))
+       if(autocvar_cl_db_saveasdump)
                db_dump(ClientProgsDB, "client.db");
        else
                db_save(ClientProgsDB, "client.db");
@@ -328,7 +328,7 @@ void TrueAim_Init();
 void PostInit(void)
 {
        print(strcat("PostInit\n    maxclients = ", ftos(maxclients), "\n"));
-       localcmd(strcat("\nscoreboard_columns_set ", cvar_string("scoreboard_columns"), ";\n"));
+       localcmd(strcat("\nscoreboard_columns_set ", autocvar_scoreboard_columns, ";\n"));
 
        entity playerchecker;
        playerchecker = spawn();
@@ -358,7 +358,7 @@ float CSQC_ConsoleCommand(string strMessage)
        strCmd = argv(0);
 
        if(strCmd == "hud_configure") { // config hud
-               cvar_set("_hud_configure", ftos(!cvar("_hud_configure")));
+               cvar_set("_hud_configure", ftos(!autocvar__hud_configure));
                return true;
        } else if(strCmd == "hud_save") { // save hud config
                if(argv(1) == "" || argv(2)) {
index e640e90..908e6db 100644 (file)
@@ -102,7 +102,7 @@ void CheckForGamestartChange() {
        if (previous_game_starttime != startTime) {
                if ((time + 5.0) < startTime) {
                        //if connecting to server while restart was active don't always play prepareforbattle
-                       sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/prepareforbattle.wav"), VOL_BASEVOICE, ATTN_NONE);
+                       sound(world, CHAN_AUTO, strcat("announcer/", autocvar_cl_announcer, "/prepareforbattle.wav"), VOL_BASEVOICE, ATTN_NONE);
                }
                if (time < startTime) {
                        restartAnnouncer = spawn();
@@ -127,11 +127,11 @@ vector GetCurrentFov(float fov)
 {
        float zoomsensitivity, zoomspeed, zoomfactor, zoomdir, velocityzoom;
 
-       zoomsensitivity = cvar("cl_zoomsensitivity");
-       zoomfactor = cvar("cl_zoomfactor");
+       zoomsensitivity = autocvar_cl_zoomsensitivity;
+       zoomfactor = autocvar_cl_zoomfactor;
        if(zoomfactor < 1 || zoomfactor > 16)
                zoomfactor = 2.5;
-       zoomspeed = cvar("cl_zoomspeed");
+       zoomspeed = autocvar_cl_zoomspeed;
        if(zoomspeed >= 0)
                if(zoomspeed < 0.5 || zoomspeed > 16)
                        zoomspeed = 3.5;
@@ -185,11 +185,11 @@ vector GetCurrentFov(float fov)
        else
                setsensitivityscale(1);
 
-       velocityzoom = bound(0, drawframetime / max(0.000000001, cvar_or("cl_velocityzoomtime", 0.3)), 1);
+       velocityzoom = bound(0, drawframetime / max(0.000000001, autocvar_cl_velocityzoomtime), 1);
        avgspeed = avgspeed * (1 - velocityzoom) + (vlen(pmove_vel) / 1000) * velocityzoom;
-       velocityzoom = exp(float2range11(avgspeed * -cvar_or("cl_velocityzoom", 0) / 1) * 1);
+       velocityzoom = exp(float2range11(avgspeed * -autocvar_cl_velocityzoom / 1) * 1);
 
-       //print(ftos(avgspeed), " avgspeed, ", ftos(cvar_or("cl_velocityzoom", 0)), " cvar, ", ftos(velocityzoom), " return\n"); // for debugging
+       //print(ftos(avgspeed), " avgspeed, ", ftos(autocvar_cl_velocityzoom), " cvar, ", ftos(velocityzoom), " return\n"); // for debugging
 
        float frustumx, frustumy, fovx, fovy;
        frustumy = tan(fov * M_PI / 360.0) * 0.75 * current_viewzoom * velocityzoom;
@@ -391,7 +391,7 @@ void CSQC_UpdateView(float w, float h)
        input_angles = warpzone_fixview_cl_viewangles;
        view_angles = warpzone_fixview_angles;
 
-       if(cvar("cl_lockview") || (autocvar__hud_configure && spectatee_status <= 0))
+       if(autocvar_cl_lockview || (autocvar__hud_configure && spectatee_status <= 0))
        {
                pmove_org = freeze_pmove_org;
                input_angles = view_angles = freeze_input_angles;
@@ -457,7 +457,7 @@ void CSQC_UpdateView(float w, float h)
        maptimeAnnouncer();
        carrierAnnouncer();
 
-       fov = cvar("fov");
+       fov = autocvar_fov;
        if(button_zoom || fov <= 59.5)
        {
                if(!zoomscript_caught)
@@ -477,7 +477,7 @@ void CSQC_UpdateView(float w, float h)
                }
        }
 
-       ColorTranslateMode = cvar("cl_stripcolorcodes");
+       ColorTranslateMode = autocvar_cl_stripcolorcodes;
        activeweapon = getstati(STAT_SWITCHWEAPON);
        f = (serverflags & SERVERFLAG_TEAMPLAY);
        if(f != teamplay)
@@ -509,16 +509,16 @@ void CSQC_UpdateView(float w, float h)
        R_SetView(VF_DRAWWORLD, 1);
 
        // Set the console size vars
-       vid_conwidth = cvar("vid_conwidth");
-       vid_conheight = cvar("vid_conheight");
-       vid_pixelheight = cvar("vid_pixelheight");
+       vid_conwidth = autocvar_vid_conwidth;
+       vid_conheight = autocvar_vid_conheight;
+       vid_pixelheight = autocvar_vid_pixelheight;
 
        R_SetView(VF_FOV, GetCurrentFov(fov));
 
        // Camera for demo playback
        if(camera_active)
        {
-               if(cvar("camera_enable"))
+               if(autocvar_camera_enable)
                        CSQC_Demo_Camera();
                else
                {
@@ -528,13 +528,13 @@ void CSQC_UpdateView(float w, float h)
                }
        }
 #ifdef CAMERATEST
-       else if(cvar("camera_enable"))
+       else if(autocvar_camera_enable)
 #else
-       else if(cvar("camera_enable") && isdemo())
+       else if(autocvar_camera_enable && isdemo())
 #endif
        {
                // Enable required Darkplaces cvars
-               chase_active_backup = cvar("chase_active");
+               chase_active_backup = autocvar_chase_active;
                cvar_set("chase_active", "2");
                cvar_set("cl_demo_mousegrab", "1");
                camera_active = TRUE;
@@ -548,8 +548,8 @@ void CSQC_UpdateView(float w, float h)
        R_SetView(VF_DRAWENGINEHUD, 0);
 
        // fetch this one only once per frame
-       hud_showbinds = cvar("hud_showbinds");
-       hud_showbinds_limit = cvar("hud_showbinds_limit");
+       hud_showbinds = autocvar_hud_showbinds;
+       hud_showbinds_limit = autocvar_hud_showbinds_limit;
 
        // Update the mouse position
        /*
@@ -572,7 +572,7 @@ void CSQC_UpdateView(float w, float h)
        // next R_RenderScene call
        drawstring('0 0 0', "", '1 1 0', '1 1 1', 0, 0);
 
-       if(cvar("r_fakelight") >= 2 || cvar("r_fullbright") >= 1)
+       if(autocvar_r_fakelight >= 2 || autocvar_r_fullbright >= 1)
        if not(serverflags & SERVERFLAG_ALLOW_FULLBRIGHT)
        {
                // apply night vision effect
@@ -590,7 +590,7 @@ void CSQC_UpdateView(float w, float h)
                }
 
                // color tint in yellow
-               drawfill('0 0 0', cvar("vid_conwidth") * '1 0 0' + cvar("vid_conheight") * '0 1 0', '0.5 1 0.3', 1, DRAWFLAG_MODULATE);
+               drawfill('0 0 0', autocvar_vid_conwidth * '1 0 0' + autocvar_vid_conheight * '0 1 0', '0.5 1 0.3', 1, DRAWFLAG_MODULATE);
 
                // draw BG
                a = Noise_Pink(nightvision_noise, frametime * 1.5) * 0.05 + 0.15;
@@ -602,9 +602,9 @@ void CSQC_UpdateView(float w, float h)
                tc_11 = tc_01 + tc_10 - tc_00;
                R_BeginPolygon("gfx/nightvision-bg.tga", DRAWFLAG_ADDITIVE);
                R_PolygonVertex('0 0 0', tc_00, rgb, a);
-               R_PolygonVertex(cvar("vid_conwidth") * '1 0 0', tc_10, rgb, a);
-               R_PolygonVertex(cvar("vid_conwidth") * '1 0 0' + cvar("vid_conheight") * '0 1 0', tc_11, rgb, a);
-               R_PolygonVertex(cvar("vid_conheight") * '0 1 0', tc_01, rgb, a);
+               R_PolygonVertex(autocvar_vid_conwidth * '1 0 0', tc_10, rgb, a);
+               R_PolygonVertex(autocvar_vid_conwidth * '1 0 0' + autocvar_vid_conheight * '0 1 0', tc_11, rgb, a);
+               R_PolygonVertex(autocvar_vid_conheight * '0 1 0', tc_01, rgb, a);
                R_EndPolygon();
 
                // draw FG
@@ -616,9 +616,9 @@ void CSQC_UpdateView(float w, float h)
                tc_11 = tc_01 + tc_10 - tc_00;
                R_BeginPolygon("gfx/nightvision-fg.tga", DRAWFLAG_ADDITIVE);
                R_PolygonVertex('0 0 0', tc_00, rgb, a);
-               R_PolygonVertex(cvar("vid_conwidth") * '1 0 0', tc_10, rgb, a);
-               R_PolygonVertex(cvar("vid_conwidth") * '1 0 0' + cvar("vid_conheight") * '0 1 0', tc_11, rgb, a);
-               R_PolygonVertex(cvar("vid_conheight") * '0 1 0', tc_01, rgb, a);
+               R_PolygonVertex(autocvar_vid_conwidth * '1 0 0', tc_10, rgb, a);
+               R_PolygonVertex(autocvar_vid_conwidth * '1 0 0' + autocvar_vid_conheight * '0 1 0', tc_11, rgb, a);
+               R_PolygonVertex(autocvar_vid_conheight * '0 1 0', tc_01, rgb, a);
                R_EndPolygon();
        }
 
@@ -635,7 +635,7 @@ void CSQC_UpdateView(float w, float h)
        else if(activeweapon == WEP_NEX && button_attack2 || activeweapon == WEP_CAMPINGRIFLE && button_attack2)
                reticle_type = 2; // nex zoom
 
-       if(cvar("cl_reticle_stretch"))
+       if(autocvar_cl_reticle_stretch)
        {
                reticle_size_x = vid_conwidth;
                reticle_size_y = vid_conheight;
@@ -653,39 +653,39 @@ void CSQC_UpdateView(float w, float h)
        f = current_zoomfraction;
        if(zoomscript_caught)
                f = 1;
-       if(cvar("cl_reticle_item_normal"))
+       if(autocvar_cl_reticle_item_normal)
        {
                precache_pic("gfx/reticle_normal");
                if(reticle_type == 1 && f)
-                       drawpic(reticle_pos, "gfx/reticle_normal", reticle_size, '1 1 1', f * cvar("cl_reticle_item_normal"), DRAWFLAG_NORMAL);
+                       drawpic(reticle_pos, "gfx/reticle_normal", reticle_size, '1 1 1', f * autocvar_cl_reticle_item_normal, DRAWFLAG_NORMAL);
        }
-       if(cvar("cl_reticle_item_nex"))
+       if(autocvar_cl_reticle_item_nex)
        {
                precache_pic("gfx/reticle_nex");
                if(reticle_type == 2 && f)
-                       drawpic(reticle_pos, "gfx/reticle_nex", reticle_size, '1 1 1', f * cvar("cl_reticle_item_nex"), DRAWFLAG_NORMAL);
+                       drawpic(reticle_pos, "gfx/reticle_nex", reticle_size, '1 1 1', f * autocvar_cl_reticle_item_nex, DRAWFLAG_NORMAL);
        }
 
        // improved polyblend
        vector rgb;
-       if(cvar("hud_damage"))
+       if(autocvar_hud_damage)
        {
                float myhealth_flash_temp;
                myhealth = getstati(STAT_HEALTH);
 
                // fade out
-               myhealth_flash = max(0, myhealth_flash - cvar("hud_damage_fade_rate") * frametime);
+               myhealth_flash = max(0, myhealth_flash - autocvar_hud_damage_fade_rate * frametime);
                // add new damage
-               myhealth_flash = bound(0, myhealth_flash + max(0, myhealth_prev - myhealth) * cvar("hud_damage_factor"), cvar("hud_damage_maxalpha"));
+               myhealth_flash = bound(0, myhealth_flash + max(0, myhealth_prev - myhealth) * autocvar_hud_damage_factor, autocvar_hud_damage_maxalpha);
 
                float pain_threshold, pain_threshold_lower, pain_threshold_lower_health;
-               pain_threshold = cvar("hud_damage_pain_threshold");
-               pain_threshold_lower = cvar("hud_damage_pain_threshold_lower");
-               pain_threshold_lower_health = cvar("hud_damage_pain_threshold_lower_health");
+               pain_threshold = autocvar_hud_damage_pain_threshold;
+               pain_threshold_lower = autocvar_hud_damage_pain_threshold_lower;
+               pain_threshold_lower_health = autocvar_hud_damage_pain_threshold_lower_health;
 
                if(pain_threshold_lower && myhealth < pain_threshold_lower_health)
                {
-                       pain_threshold = pain_threshold - max(cvar("hud_damage_pain_threshold_pulsating_min"), fabs(sin(M_PI * time / cvar("hud_damage_pain_threshold_pulsating_period")))) * pain_threshold_lower * (1 - max(0, myhealth)/pain_threshold_lower_health);
+                       pain_threshold = pain_threshold - max(autocvar_hud_damage_pain_threshold_pulsating_min, fabs(sin(M_PI * time / autocvar_hud_damage_pain_threshold_pulsating_period))) * pain_threshold_lower * (1 - max(0, myhealth)/pain_threshold_lower_health);
                }
 
                myhealth_flash_temp = bound(0, myhealth_flash - pain_threshold, 1);
@@ -699,7 +699,7 @@ void CSQC_UpdateView(float w, float h)
                        }
                        else
                        {
-                               myhealth_flash += cvar("hud_damage_fade_rate") * frametime; // dead
+                               myhealth_flash += autocvar_hud_damage_fade_rate * frametime; // dead
                        }
                }
 
@@ -711,7 +711,7 @@ void CSQC_UpdateView(float w, float h)
 
                myhealth_prev = myhealth;
 
-               if(autocvar_cl_gentle_damage || cvar("cl_gentle"))
+               if(autocvar_cl_gentle_damage || autocvar_cl_gentle)
                {
                        if(autocvar_cl_gentle_damage == 2)
                        {
@@ -721,12 +721,12 @@ void CSQC_UpdateView(float w, float h)
                                }
                        }
                        else
-                               myhealth_gentlergb = stov(cvar_string("hud_damage_gentle_color"));
+                               myhealth_gentlergb = stov(autocvar_hud_damage_gentle_color);
 
-                       drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, myhealth_gentlergb, cvar("hud_damage_gentle_alpha_multiplier") * bound(0, myhealth_flash_temp, 1) * cvar("hud_damage"), DRAWFLAG_NORMAL);
+                       drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, myhealth_gentlergb, autocvar_hud_damage_gentle_alpha_multiplier * bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL);
                }
                else
-                       drawpic(reticle_pos, "gfx/blood", reticle_size, stov(cvar_string("hud_damage_color")), bound(0, myhealth_flash_temp, 1) * cvar("hud_damage"), DRAWFLAG_NORMAL);
+                       drawpic(reticle_pos, "gfx/blood", reticle_size, stov(autocvar_hud_damage_color), bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL);
        }
 
        // Draw the mouse cursor
@@ -767,29 +767,29 @@ void CSQC_UpdateView(float w, float h)
                if(gametype == GAME_FREEZETAG)
                {
                        if(getstati(STAT_FROZEN))
-                               drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, '0.25 0.90 1', cvar_or("hud_colorflash_alpha", 0.5), DRAWFLAG_ADDITIVE);
+                               drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
                        if(getstatf(STAT_REVIVE_PROGRESS))
                        {
-                               DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", getstatf(STAT_REVIVE_PROGRESS), '0.25 0.90 1', cvar("hud_colorflash_alpha"), DRAWFLAG_ADDITIVE);
+                               DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", getstatf(STAT_REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
                                drawstring_aspect(eY * 0.64 * vid_conheight, "Revival progress", eX * vid_conwidth + eY * 0.025 * vid_conheight, '1 1 1', 1, DRAWFLAG_NORMAL);
                        }
                }
 
-               if(cvar("r_letterbox") == 0)
-                       if(cvar("viewsize") < 120)
+               if(autocvar_r_letterbox == 0)
+                       if(autocvar_viewsize < 120)
                                CSQC_common_hud();
 
                // crosshair goes VERY LAST
                if(!scoreboard_active && !camera_active && intermission != 2) {
                        string wcross_style;
                        float wcross_alpha, wcross_resolution;
-                       wcross_style = cvar_string("crosshair");
+                       wcross_style = autocvar_crosshair;
                        if (wcross_style == "0")
                                return;
-                       wcross_resolution = cvar("crosshair_size");
+                       wcross_resolution = autocvar_crosshair_size;
                        if (wcross_resolution == 0)
                                return;
-                       wcross_alpha = cvar("crosshair_alpha");
+                       wcross_alpha = autocvar_crosshair_alpha;
                        if (wcross_alpha == 0)
                                return;
 
@@ -799,7 +799,7 @@ void CSQC_UpdateView(float w, float h)
                        // wcross_origin = '0.5 0 0' * vid_conwidth + '0 0.5 0' * vid_conheight;
                        wcross_origin = project_3d_to_2d(view_origin + MAX_SHOT_DISTANCE * view_forward);
                        wcross_origin_z = 0;
-                       if(cvar("crosshair_hittest"))
+                       if(autocvar_crosshair_hittest)
                        {
                                vector wcross_oldorigin;
                                wcross_oldorigin = wcross_origin;
@@ -812,7 +812,7 @@ void CSQC_UpdateView(float w, float h)
                                        if(vlen(v) > 0.01)
                                                shottype = SHOTTYPE_HITOBSTRUCTION;
                                }
-                               if(!cvar("crosshair_hittest_showimpact"))
+                               if(!autocvar_crosshair_hittest_showimpact)
                                        wcross_origin = wcross_oldorigin;
                        }
                        else
@@ -822,12 +822,12 @@ void CSQC_UpdateView(float w, float h)
                        string wcross_wep, wcross_name;
                        float wcross_scale, wcross_blur;
 
-                       if (cvar("crosshair_per_weapon") || cvar("crosshair_color_per_weapon")) {
+                       if (autocvar_crosshair_per_weapon || autocvar_crosshair_color_per_weapon) {
                                e = get_weaponinfo(activeweapon);
                                if (e && e.netname != "")
                                {
                                        wcross_wep = e.netname;
-                                       if(cvar("crosshair_per_weapon"))
+                                       if(autocvar_crosshair_per_weapon)
                                        {
                                                wcross_resolution *= cvar(strcat("crosshair_", wcross_wep, "_size"));
                                                if (wcross_resolution == 0)
@@ -842,14 +842,14 @@ void CSQC_UpdateView(float w, float h)
                                        }
                                }
                        }
-                       if(wcross_wep != "" && cvar("crosshair_color_per_weapon"))
+                       if(wcross_wep != "" && autocvar_crosshair_color_per_weapon)
                                wcross_color = stov(cvar_string(strcat("crosshair_", wcross_wep, "_color")));
                        else
-                               wcross_color = stov(cvar_string("crosshair_color"));
+                               wcross_color = stov(autocvar_crosshair_color);
 
                        wcross_name = strcat("gfx/crosshair", wcross_style);
 
-                       if(cvar("crosshair_effect_scalefade"))
+                       if(autocvar_crosshair_effect_scalefade)
                        {
                                wcross_scale = wcross_resolution;
                                wcross_resolution = 1;
@@ -859,7 +859,7 @@ void CSQC_UpdateView(float w, float h)
                                wcross_scale = 1;
                        }
 
-                       if(cvar("crosshair_pickup"))
+                       if(autocvar_crosshair_pickup)
                        {
                                if(pickup_crosshair_time < getstatf(STAT_LAST_PICKUP))
                                {
@@ -868,19 +868,19 @@ void CSQC_UpdateView(float w, float h)
                                }
 
                                if(pickup_crosshair_size > 0)
-                                       pickup_crosshair_size -= cvar("crosshair_pickup_speed") * frametime;
+                                       pickup_crosshair_size -= autocvar_crosshair_pickup_speed * frametime;
                                else
                                        pickup_crosshair_size = 0;
 
-                               wcross_scale += sin(pickup_crosshair_size) * cvar("crosshair_pickup");
+                               wcross_scale += sin(pickup_crosshair_size) * autocvar_crosshair_pickup;
                        }
 
                        if(shottype == SHOTTYPE_HITENEMY)
-                               wcross_scale *= cvar("crosshair_hittest"); // is not queried if hittest is 0
+                               wcross_scale *= autocvar_crosshair_hittest; // is not queried if hittest is 0
                        if(shottype == SHOTTYPE_HITTEAM)
-                               wcross_scale /= cvar("crosshair_hittest"); // is not queried if hittest is 0
+                               wcross_scale /= autocvar_crosshair_hittest; // is not queried if hittest is 0
 
-                       f = cvar("crosshair_effect_speed");
+                       f = autocvar_crosshair_effect_speed;
                        if(f < 0)
                                f *= -2 * g_weaponswitchdelay;
                        if(wcross_scale != wcross_scale_goal_prev || wcross_alpha != wcross_alpha_goal_prev || wcross_color != wcross_color_goal_prev)
@@ -904,7 +904,7 @@ void CSQC_UpdateView(float w, float h)
                        wcross_alpha_goal_prev = wcross_alpha;
                        wcross_color_goal_prev = wcross_color;
 
-                       if(shottype == SHOTTYPE_HITTEAM || (shottype == SHOTTYPE_HITOBSTRUCTION && cvar("crosshair_hittest_blur") && !cvar("chase_active")))
+                       if(shottype == SHOTTYPE_HITTEAM || (shottype == SHOTTYPE_HITOBSTRUCTION && autocvar_crosshair_hittest_blur && !autocvar_chase_active))
                        {
                                wcross_blur = 1;
                                wcross_alpha *= 0.75;
@@ -926,10 +926,10 @@ void CSQC_UpdateView(float w, float h)
                        wcross_alpha_prev = wcross_alpha;
                        wcross_color_prev = wcross_color;
 
-                       wcross_scale *= 1 - cvar("_menu_alpha");
-                       wcross_alpha *= 1 - cvar("_menu_alpha");
+                       wcross_scale *= 1 - autocvar__menu_alpha;
+                       wcross_alpha *= 1 - autocvar__menu_alpha;
 
-                       ring_scale = cvar("crosshair_ring_size");
+                       ring_scale = autocvar_crosshair_ring_size;
 
                        wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
 
@@ -946,7 +946,7 @@ void CSQC_UpdateView(float w, float h)
                                bullets = getstati(STAT_BULLETS_LOADED);
                                f = bound(0, bullets / cr_maxbullets, 1);
 
-                               a = cvar("crosshair_ring_campingrifle_alpha");
+                               a = autocvar_crosshair_ring_campingrifle_alpha;
                                DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
                        }
                        else if (activeweapon == WEP_NEX && nex_charge) // ring around crosshair representing velocity-dependent damage for the nex
@@ -955,22 +955,22 @@ void CSQC_UpdateView(float w, float h)
                                {
                                        use_nex_chargepool = 1;
 
-                                       a = cvar("crosshair_ring_nex_inner_alpha");
-                                       rgb = eX * cvar("crosshair_ring_nex_inner_color_red") + eY * cvar("crosshair_ring_nex_inner_color_green") + eZ * cvar("crosshair_ring_nex_inner_color_blue");
+                                       a = autocvar_crosshair_ring_nex_inner_alpha;
+                                       rgb = eX * autocvar_crosshair_ring_nex_inner_color_red + eY * autocvar_crosshair_ring_nex_inner_color_green + eZ * autocvar_crosshair_ring_nex_inner_color_blue;
                                        DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", nex_chargepool, rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
                                }
                                else
                                {
                                        // indicate how much we're charging right now with an inner circle
-                                       a = cvar("crosshair_ring_nex_inner_alpha");
-                                       nex_charge_movingavg = (1 - cvar("crosshair_ring_nex_currentcharge_movingavg_rate")) * nex_charge_movingavg + cvar("crosshair_ring_nex_currentcharge_movingavg_rate") * nex_charge;
+                                       a = autocvar_crosshair_ring_nex_inner_alpha;
+                                       nex_charge_movingavg = (1 - autocvar_crosshair_ring_nex_currentcharge_movingavg_rate) * nex_charge_movingavg + autocvar_crosshair_ring_nex_currentcharge_movingavg_rate * nex_charge;
 
-                                       rgb = eX * cvar("crosshair_ring_nex_inner_color_red") + eY * cvar("crosshair_ring_nex_inner_color_green") + eZ * cvar("crosshair_ring_nex_inner_color_blue");
-                                       DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", bound(0, cvar("crosshair_ring_nex_currentcharge_scale") * (nex_charge - nex_charge_movingavg), 1), rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
+                                       rgb = eX * autocvar_crosshair_ring_nex_inner_color_red + eY * autocvar_crosshair_ring_nex_inner_color_green + eZ * autocvar_crosshair_ring_nex_inner_color_blue;
+                                       DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", bound(0, autocvar_crosshair_ring_nex_currentcharge_scale * (nex_charge - nex_charge_movingavg), 1), rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
                                }
 
                                // draw the charge
-                               a = cvar("crosshair_ring_nex_outer_alpha");
+                               a = autocvar_crosshair_ring_nex_outer_alpha;
                                DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", nex_charge, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
                        }
 
@@ -1011,13 +1011,13 @@ void CSQC_UpdateView(float w, float h)
                        wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
                        CROSSHAIR_DRAW(wcross_resolution, wcross_name, wcross_alpha * f);
 
-                       if(cvar("crosshair_dot"))
+                       if(autocvar_crosshair_dot)
             {
                 vector wcross_color_old;
                 wcross_color_old = wcross_color;
-                if(cvar_string("crosshair_dot_color") != "0")
-                    wcross_color = stov(cvar_string("crosshair_dot_color"));
-                               CROSSHAIR_DRAW(wcross_resolution * cvar("crosshair_dot_size"), "gfx/crosshairdot.tga", f * cvar("crosshair_dot_alpha"));
+                if(autocvar_crosshair_dot_color != "0")
+                    wcross_color = stov(autocvar_crosshair_dot_color);
+                               CROSSHAIR_DRAW(wcross_resolution * autocvar_crosshair_dot_size, "gfx/crosshairdot.tga", f * autocvar_crosshair_dot_alpha);
                 wcross_color = wcross_color_old;
             }
 
@@ -1055,8 +1055,8 @@ void CSQC_UpdateView(float w, float h)
        if(cs_project_is_b0rked == 0)
        {
                string w0, h0;
-               w0 = cvar_string("vid_conwidth");
-               h0 = cvar_string("vid_conheight");
+               w0 = ftos(autocvar_vid_conwidth);
+               h0 = ftos(autocvar_vid_conheight);
                //R_SetView(VF_VIEWPORT, '0 0 0', '640 480 0');
                //R_SetView(VF_FOV, '90 90 0');
                R_SetView(VF_ORIGIN, '0 0 0');
@@ -1108,9 +1108,9 @@ void CSQC_SPIDER_HUD()
 
     // Draw the crosshairs
     picsize = drawgetimagesize(SPIDER_CROSS);
-    picsize_x *= cvar_or("cl_vehicle_spiderbot_cross_size", 1);
-    picsize_y *= cvar_or("cl_vehicle_spiderbot_cross_size", 1);
-    drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), SPIDER_CROSS, picsize, '1 1 1', cvar_or("cl_vehicle_spiderbot_cross_alpha",0.6), DRAWFLAG_NORMAL);
+    picsize_x *= autocvar_cl_vehicle_spiderbot_cross_size;
+    picsize_y *= autocvar_cl_vehicle_spiderbot_cross_size;
+    drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), SPIDER_CROSS, picsize, '1 1 1', autocvar_cl_vehicle_spiderbot_cross_alpha, DRAWFLAG_NORMAL);
 
     hudloc_y =  4;
     hudloc_x = 4;
@@ -1220,9 +1220,9 @@ void CSQC_RAPTOR_HUD()
 
     // Draw the crosshairs
     picsize = drawgetimagesize(SPIDER_CROSS);
-    picsize_x *= cvar_or("cl_vehicle_spiderbot_cross_size", 1);
-    picsize_y *= cvar_or("cl_vehicle_spiderbot_cross_size", 1);
-    drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), SPIDER_CROSS, picsize, '1 1 1', cvar_or("cl_vehicle_spiderbot_cross_alpha",0.6), DRAWFLAG_NORMAL);
+    picsize_x *= autocvar_cl_vehicle_spiderbot_cross_size;
+    picsize_y *= autocvar_cl_vehicle_spiderbot_cross_size;
+    drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), SPIDER_CROSS, picsize, '1 1 1', autocvar_cl_vehicle_spiderbot_cross_alpha, DRAWFLAG_NORMAL);
 
     hudloc_y =  4;
     hudloc_x = 4;
@@ -1285,9 +1285,9 @@ void CSQC_WAKIZASHI_HUD()
        vector picsize, hudloc;
 
     picsize = drawgetimagesize(SPIDER_CROSS);
-    picsize_x *= cvar_or("cl_vehicle_spiderbot_cross_size", 1);
-    picsize_y *= cvar_or("cl_vehicle_spiderbot_cross_size", 1);
-    drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), SPIDER_CROSS, picsize, '1 1 1', cvar_or("cl_vehicle_spiderbot_cross_alpha",0.6), DRAWFLAG_NORMAL);
+    picsize_x *= autocvar_cl_vehicle_spiderbot_cross_size;
+    picsize_y *= autocvar_cl_vehicle_spiderbot_cross_size;
+    drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), SPIDER_CROSS, picsize, '1 1 1', autocvar_cl_vehicle_spiderbot_cross_alpha, DRAWFLAG_NORMAL);
 
 /*
 const float STAT_VEHICLESTAT_HEALTH  = 60;
@@ -1393,11 +1393,11 @@ void CSQC_common_hud(void)
                        float i;
                        if(!(gametype == GAME_RACE || gametype == GAME_CTS))
                        {
-                               if(cvar_string("accuracy_color_levels") != acc_color_levels)
+                               if(autocvar_accuracy_color_levels != acc_color_levels)
                                {
                                        if(acc_color_levels)
                                                strunzone(acc_color_levels);
-                                       acc_color_levels = strzone(cvar_string("accuracy_color_levels"));
+                                       acc_color_levels = strzone(autocvar_accuracy_color_levels);
                                        acc_levels = tokenize(acc_color_levels);
                                        if (acc_levels > MAX_ACCURACY_LEVELS)
                                                acc_levels = MAX_ACCURACY_LEVELS;
@@ -1423,12 +1423,12 @@ void CSQC_common_hud(void)
                                HUD_Reset();
 
                                centerprint_start_x = 0;
-                               centerprint_start_y = cvar("scr_centerpos") * vid_conheight;
+                               centerprint_start_y = autocvar_scr_centerpos * vid_conheight;
                        }
                        else // hud
                        {
                                centerprint_start_x = 0;
-                               centerprint_start_y = cvar("scr_centerpos") * vid_conheight;
+                               centerprint_start_y = autocvar_scr_centerpos * vid_conheight;
                        }
 
                        HUD_DrawCenterPrint();
@@ -1452,7 +1452,7 @@ void CSQC_Demo_Camera()
        float speed, attenuation, dimensions;
        vector tmp, delta;
 
-       if( cvar("camera_reset") || !camera_mode )
+       if( autocvar_camera_reset || !camera_mode )
        {
                camera_offset = '0 0 0';
                current_angles = '0 0 0';
@@ -1468,9 +1468,9 @@ void CSQC_Demo_Camera()
 
        // Camera angles
        if( camera_roll )
-               mouse_angles_z += camera_roll * cvar("camera_speed_roll");
+               mouse_angles_z += camera_roll * autocvar_camera_speed_roll;
 
-       if(cvar("camera_look_player"))
+       if(autocvar_camera_look_player)
        {
                local vector dir;
                local float n;
@@ -1484,7 +1484,7 @@ void CSQC_Demo_Camera()
        else
        {
                tmp = getmousepos() * 0.1;
-               if(vlen(tmp)>cvar("camera_mouse_treshold"))
+               if(vlen(tmp)>autocvar_camera_mouse_treshold)
                {
                        mouse_angles_x += tmp_y * cos(mouse_angles_z * DEG2RAD) + (tmp_x * sin(mouse_angles_z * DEG2RAD));
                        mouse_angles_y -= tmp_x * cos(mouse_angles_z * DEG2RAD) + (tmp_y * -sin(mouse_angles_z * DEG2RAD));
@@ -1503,10 +1503,10 @@ void CSQC_Demo_Camera()
        if(mouse_angles_y > 60 && current_angles_y < -60)
                delta = '0 -360 0';
 
-       if(cvar("camera_look_player"))
-               attenuation = cvar("camera_look_attenuation");
+       if(autocvar_camera_look_player)
+               attenuation = autocvar_camera_look_attenuation;
        else
-               attenuation = cvar("camera_speed_attenuation");
+               attenuation = autocvar_camera_speed_attenuation;
 
        attenuation = 1 / max(1, attenuation);
        current_angles += (mouse_angles - current_angles + delta) * attenuation;
@@ -1524,7 +1524,7 @@ void CSQC_Demo_Camera()
        {
                tmp_x = camera_direction_x * cos(current_angles_y * DEG2RAD);
                tmp_y = camera_direction_x * sin(current_angles_y * DEG2RAD);
-               if( cvar("camera_forward_follows") && !cvar("camera_look_player") )
+               if( autocvar_camera_forward_follows && !autocvar_camera_look_player )
                        tmp_z = camera_direction_x * -sin(current_angles_x * DEG2RAD);
                ++dimensions;
        }
@@ -1543,10 +1543,10 @@ void CSQC_Demo_Camera()
                ++dimensions;
        }
 
-       if(cvar("camera_free"))
-               speed = cvar("camera_speed_free");
+       if(autocvar_camera_free)
+               speed = autocvar_camera_speed_free;
        else
-               speed = cvar("camera_speed_chase");
+               speed = autocvar_camera_speed_chase;
 
        if(dimensions)
        {
@@ -1557,7 +1557,7 @@ void CSQC_Demo_Camera()
        current_camera_offset += (camera_offset - current_camera_offset) * attenuation;
 
        // Camera modes
-       if( cvar("camera_free") )
+       if( autocvar_camera_free )
        {
                if ( camera_mode == CAMERA_CHASE )
                {
@@ -1579,7 +1579,7 @@ void CSQC_Demo_Camera()
 
                camera_mode = CAMERA_CHASE;
 
-               if(cvar("camera_chase_smoothly"))
+               if(autocvar_camera_chase_smoothly)
                        current_origin += (view_origin - current_origin) * attenuation;
                else
                        current_origin = view_origin;
index 873df14..f3d18aa 100644 (file)
-var float autocvar_cl_projectiles_sloppy = 0;
-
-var float autocvar_cl_gibs_ticrate = 0.1;
-var float autocvar_cl_gibs_sloppy = 1;
-
-var float autocvar_cl_casings_ticrate = 0.1;
+float autocvar__con_chat_maximized;
+float autocvar__hud_configure;
+string autocvar__hud_panelorder;
+float autocvar__menu_alpha;
+string autocvar_accuracy_color_levels;
+float autocvar_bgmvolume;
+float autocvar_camera_chase_smoothly;
+float autocvar_camera_enable;
+float autocvar_camera_forward_follows;
+float autocvar_camera_free;
+float autocvar_camera_look_attenuation;
+float autocvar_camera_look_player;
+float autocvar_camera_mouse_treshold;
+float autocvar_camera_reset;
+float autocvar_camera_speed_attenuation;
+float autocvar_camera_speed_chase;
+float autocvar_camera_speed_free;
+float autocvar_camera_speed_roll;
+float autocvar_chase_active;
+float autocvar_cl_allow_uid2name;
+string autocvar_cl_announcer;
+float autocvar_cl_autodemo_delete;
+float autocvar_cl_autodemo_delete_keeprecords;
+float autocvar_cl_casings;
+float autocvar_cl_casings_bronze_time;
+var float autocvar_cl_casings_maxcount = 100;
+float autocvar_cl_casings_shell_time;
 var float autocvar_cl_casings_sloppy = 1;
-
-var float autocvar_cl_gentle_damage;
-
-var float autocvar_scoreboard_color_bg_team;
-
-var float autocvar__menu_alpha;
-
-var float autocvar__hud_configure;
-var float autocvar_hud_configure_teamcolorforced;
-var float autocvar_hud_configure_bg_minalpha;
-var float autocvar_hud_configure_grid;
-var float autocvar_hud_configure_grid_xsize;
-var float autocvar_hud_configure_grid_ysize;
-var float autocvar_hud_configure_grid_alpha;
-
-var float autocvar__con_chat_maximized;
-var string autocvar__hud_panelorder;
-
-var string autocvar_hud_dock;
-
-var float autocvar_hud_progressbar_alpha;
-
-var string autocvar_hud_panel_bg;
-var vector autocvar_hud_panel_bg_color;
-var float autocvar_hud_panel_bg_color_team;
-var float autocvar_hud_panel_bg_alpha;
-var float autocvar_hud_panel_bg_border;
-var float autocvar_hud_panel_bg_padding;
-var float autocvar_hud_panel_fg_alpha;
-
-var float autocvar_hud_panel_weapons;
-
-var float autocvar_hud_panel_ammo;
-var float autocvar_hud_panel_ammo_onlycurrent;
-var float autocvar_hud_panel_ammo_iconalign;
-
-var float autocvar_hud_panel_powerups;
-
-var float autocvar_hud_panel_healtharmor;
-
-var float autocvar_hud_panel_notify;
-
-var float autocvar_hud_panel_timer;
-var float autocvar_hud_panel_timer_increment;
-
-var float autocvar_hud_panel_radar;
-
-var float autocvar_hud_panel_score;
-
-var float autocvar_hud_panel_racetimer;
-
-var float autocvar_hud_panel_vote;
-
-var float autocvar_hud_panel_modicons;
-
-var float autocvar_hud_panel_pressedkeys;
-
-var float autocvar_hud_panel_chat;
-
-var float autocvar_hud_panel_engineinfo;
-
-var float autocvar_hud_panel_infomessages;
-var float autocvar_hud_panel_infomessages_flip;
-
-var float autocvar_scoreboard_border_thickness;
-
-var float autocvar_cl_allow_uid2name;
+var float autocvar_cl_casings_ticrate = 0.1;
+float autocvar_cl_db_saveasdump;
+float autocvar_cl_deathscoreboard;
+float autocvar_cl_effects_lightningarc_branchfactor_add;
+float autocvar_cl_effects_lightningarc_branchfactor_start;
+float autocvar_cl_effects_lightningarc_drift_end;
+float autocvar_cl_effects_lightningarc_drift_start;
+float autocvar_cl_effects_lightningarc_segmentlength;
+float autocvar_cl_effects_lightningarc_simple;
+float autocvar_cl_gentle;
+float autocvar_cl_gentle_damage;
+float autocvar_cl_gentle_gibs;
+float autocvar_cl_gentle_messages;
+var float autocvar_cl_gibs_damageforcescale = 3.5;
+var float autocvar_cl_gibs_lifetime = 14;
+var float autocvar_cl_gibs_maxcount = 100;
+var float autocvar_cl_gibs_sloppy = 1;
+var float autocvar_cl_gibs_ticrate = 0.1;
+var float autocvar_cl_gibs_velocity_random = 1;
+var float autocvar_cl_gibs_velocity_scale = 1;
+float autocvar_cl_gibs_velocity_up;
+float autocvar_cl_gunalign;
+float autocvar_cl_hidewaypoints;
+float autocvar_cl_lockview;
+float autocvar_cl_nogibs;
+float autocvar_cl_notify_carried_items;
+float autocvar_cl_particlegibs;
+float autocvar_cl_particles_oldnexbeam;
+float autocvar_cl_particles_quality;
+float autocvar_cl_projectiles_sloppy;
+float autocvar_cl_readpicture_force;
+float autocvar_cl_reticle_item_nex;
+float autocvar_cl_reticle_item_normal;
+float autocvar_cl_reticle_stretch;
+float autocvar_cl_showacceleration;
+float autocvar_cl_showacceleration_alpha;
+string autocvar_cl_showacceleration_color;
+float autocvar_cl_showacceleration_color_custom;
+float autocvar_cl_showacceleration_position;
+float autocvar_cl_showacceleration_scale;
+float autocvar_cl_showacceleration_size;
+float autocvar_cl_showacceleration_z;
+float autocvar_cl_showspeed;
+float autocvar_cl_showspeed_position;
+float autocvar_cl_showspeed_size;
+float autocvar_cl_showspeed_unit;
+float autocvar_cl_showspeed_z;
+float autocvar_cl_sound_maptime_warning;
+float autocvar_cl_stripcolorcodes;
+var float autocvar_cl_vehicle_spiderbot_cross_alpha = 0.6;
+var float autocvar_cl_vehicle_spiderbot_cross_size = 1;
+float autocvar_cl_velocityzoom;
+var float autocvar_cl_velocityzoomtime = 0.3;
+string autocvar_cl_weaponpriority;
+float autocvar_cl_zoomfactor;
+float autocvar_cl_zoomsensitivity;
+float autocvar_cl_zoomspeed;
+float autocvar_con_chat;
+float autocvar_con_chatpos;
+float autocvar_con_chatsize;
+float autocvar_con_chattime;
+float autocvar_con_notify;
+float autocvar_con_notifysize;
+string autocvar_crosshair;
+float autocvar_crosshair_alpha;
+string autocvar_crosshair_color;
+float autocvar_crosshair_color_per_weapon;
+float autocvar_crosshair_dot;
+float autocvar_crosshair_dot_alpha;
+string autocvar_crosshair_dot_color;
+float autocvar_crosshair_dot_size;
+float autocvar_crosshair_effect_scalefade;
+float autocvar_crosshair_effect_speed;
+float autocvar_crosshair_hittest;
+float autocvar_crosshair_hittest_blur;
+float autocvar_crosshair_hittest_showimpact;
+float autocvar_crosshair_per_weapon;
+float autocvar_crosshair_pickup;
+float autocvar_crosshair_pickup_speed;
+float autocvar_crosshair_ring_campingrifle_alpha;
+float autocvar_crosshair_ring_nex_currentcharge_movingavg_rate;
+float autocvar_crosshair_ring_nex_currentcharge_scale;
+float autocvar_crosshair_ring_nex_inner_alpha;
+float autocvar_crosshair_ring_nex_inner_color_blue;
+float autocvar_crosshair_ring_nex_inner_color_green;
+float autocvar_crosshair_ring_nex_inner_color_red;
+float autocvar_crosshair_ring_nex_outer_alpha;
+float autocvar_crosshair_ring_size;
+float autocvar_crosshair_size;
+float autocvar_ekg;
+float autocvar_fov;
+float autocvar_g_balance_tuba_attenuation;
+float autocvar_g_balance_tuba_fadetime;
+float autocvar_g_balance_tuba_volume;
+float autocvar_g_warmup_limit;
+var float autocvar_g_waypointsprite_alpha = 1;
+var float autocvar_g_waypointsprite_crosshairfadealpha = 1;
+float autocvar_g_waypointsprite_crosshairfadedistance;
+var float autocvar_g_waypointsprite_crosshairfadescale = 1;
+float autocvar_g_waypointsprite_distancealphaexponent;
+var float autocvar_g_waypointsprite_distancefadealpha = 1;
+var float autocvar_g_waypointsprite_distancefadedistancemultiplier = 1;
+var float autocvar_g_waypointsprite_distancefadescale = 1;
+var float autocvar_g_waypointsprite_edgefadealpha = 1;
+float autocvar_g_waypointsprite_edgefadedistance;
+var float autocvar_g_waypointsprite_edgefadescale = 1;
+float autocvar_g_waypointsprite_minalpha;
+float autocvar_g_waypointsprite_minscale;
+float autocvar_g_waypointsprite_normdistance;
+var float autocvar_g_waypointsprite_scale = 1;
+float autocvar_g_waypointsprite_timealphaexponent;
+var float autocvar_hud_colorflash_alpha = 0.5;
+float autocvar_hud_configure_bg_minalpha;
+float autocvar_hud_configure_checkcollisions;
+float autocvar_hud_configure_grid;
+float autocvar_hud_configure_grid_alpha;
+float autocvar_hud_configure_grid_xsize;
+float autocvar_hud_configure_grid_ysize;
+float autocvar_hud_configure_teamcolorforced;
+float autocvar_hud_damage;
+string autocvar_hud_damage_color;
+float autocvar_hud_damage_factor;
+float autocvar_hud_damage_fade_rate;
+float autocvar_hud_damage_gentle_alpha_multiplier;
+string autocvar_hud_damage_gentle_color;
+float autocvar_hud_damage_maxalpha;
+float autocvar_hud_damage_pain_threshold;
+float autocvar_hud_damage_pain_threshold_lower;
+float autocvar_hud_damage_pain_threshold_lower_health;
+float autocvar_hud_damage_pain_threshold_pulsating_min;
+float autocvar_hud_damage_pain_threshold_pulsating_period;
+string autocvar_hud_dock;
+float autocvar_hud_dock_alpha;
+string autocvar_hud_dock_color;
+float autocvar_hud_dock_color_team;
+float autocvar_hud_panel_ammo;
+float autocvar_hud_panel_ammo_iconalign;
+float autocvar_hud_panel_ammo_maxammo;
+float autocvar_hud_panel_ammo_onlycurrent;
+float autocvar_hud_panel_ammo_progressbar;
+string autocvar_hud_panel_ammo_progressbar_name;
+float autocvar_hud_panel_ammo_progressbar_xoffset;
+float autocvar_hud_panel_ammo_text;
+string autocvar_hud_panel_bg;
+float autocvar_hud_panel_bg_alpha;
+float autocvar_hud_panel_bg_border;
+vector autocvar_hud_panel_bg_color;
+float autocvar_hud_panel_bg_color_team;
+float autocvar_hud_panel_bg_padding;
+float autocvar_hud_panel_chat;
+float autocvar_hud_panel_engineinfo;
+float autocvar_hud_panel_engineinfo_framecounter_decimals;
+float autocvar_hud_panel_engineinfo_framecounter_time;
+float autocvar_hud_panel_fg_alpha;
+float autocvar_hud_panel_healtharmor;
+float autocvar_hud_panel_healtharmor_baralign;
+float autocvar_hud_panel_healtharmor_flip;
+float autocvar_hud_panel_healtharmor_iconalign;
+float autocvar_hud_panel_healtharmor_maxarmor;
+float autocvar_hud_panel_healtharmor_maxhealth;
+float autocvar_hud_panel_healtharmor_progressbar;
+string autocvar_hud_panel_healtharmor_progressbar_armor;
+string autocvar_hud_panel_healtharmor_progressbar_health;
+float autocvar_hud_panel_healtharmor_text;
+float autocvar_hud_panel_infomessages;
+float autocvar_hud_panel_infomessages_flip;
+float autocvar_hud_panel_modicons;
+float autocvar_hud_panel_notify;
+float autocvar_hud_panel_notify_fadetime;
+float autocvar_hud_panel_notify_flip;
+float autocvar_hud_panel_notify_print;
+float autocvar_hud_panel_notify_time;
+float autocvar_hud_panel_powerups;
+float autocvar_hud_panel_powerups_baralign;
+float autocvar_hud_panel_powerups_flip;
+float autocvar_hud_panel_powerups_iconalign;
+float autocvar_hud_panel_powerups_progressbar;
+string autocvar_hud_panel_powerups_progressbar_shield;
+string autocvar_hud_panel_powerups_progressbar_strength;
+float autocvar_hud_panel_powerups_text;
+float autocvar_hud_panel_pressedkeys;
+float autocvar_hud_panel_pressedkeys_aspect;
+float autocvar_hud_panel_racetimer;
+float autocvar_hud_panel_radar;
+float autocvar_hud_panel_radar_foreground_alpha;
+float autocvar_hud_panel_radar_rotation;
+float autocvar_hud_panel_radar_scale;
+float autocvar_hud_panel_radar_zoommode;
+float autocvar_hud_panel_score;
+float autocvar_hud_panel_timer;
+float autocvar_hud_panel_timer_increment;
+float autocvar_hud_panel_vote;
+float autocvar_hud_panel_vote_alreadyvoted_alpha;
+string autocvar_hud_panel_vote_bg_alpha;
+float autocvar_hud_panel_weapons;
+float autocvar_hud_panel_weapons_accuracy;
+float autocvar_hud_panel_weapons_ammo;
+float autocvar_hud_panel_weapons_ammo_alpha;
+string autocvar_hud_panel_weapons_ammo_color;
+float autocvar_hud_panel_weapons_ammo_full_cells;
+float autocvar_hud_panel_weapons_ammo_full_fuel;
+float autocvar_hud_panel_weapons_ammo_full_nails;
+float autocvar_hud_panel_weapons_ammo_full_rockets;
+float autocvar_hud_panel_weapons_ammo_full_shells;
+float autocvar_hud_panel_weapons_aspect;
+float autocvar_hud_panel_weapons_complainbubble;
+string autocvar_hud_panel_weapons_complainbubble_color_donthave;
+string autocvar_hud_panel_weapons_complainbubble_color_outofammo;
+string autocvar_hud_panel_weapons_complainbubble_color_unavailable;
+float autocvar_hud_panel_weapons_complainbubble_fadetime;
+float autocvar_hud_panel_weapons_complainbubble_padding;
+float autocvar_hud_panel_weapons_complainbubble_time;
+var float autocvar_hud_panel_weapons_fade = 1;
+float autocvar_hud_panel_weapons_label;
+float autocvar_hud_panel_weapons_timeout;
+float autocvar_hud_panel_weapons_timeout_effect;
+float autocvar_hud_progressbar_alpha;
+float autocvar_hud_showbinds;
+float autocvar_hud_showbinds_limit;
+string autocvar_hud_skin;
+float autocvar_loddebug;
+float autocvar_menu_mouse_speed;
+string autocvar_menu_skin;
+float autocvar_r_fakelight;
+float autocvar_r_fullbright;
+float autocvar_r_letterbox;
+float autocvar_scoreboard_accuracy;
+float autocvar_scoreboard_accuracy_doublerows;
+float autocvar_scoreboard_alpha_bg;
+var float autocvar_scoreboard_alpha_fg = 1.0;
+var float autocvar_scoreboard_alpha_name = 0.9;
+var float autocvar_scoreboard_alpha_name_self = 1;
+float autocvar_scoreboard_bg_scale;
+float autocvar_scoreboard_border_thickness;
+float autocvar_scoreboard_color_bg_b;
+float autocvar_scoreboard_color_bg_g;
+float autocvar_scoreboard_color_bg_r;
+float autocvar_scoreboard_color_bg_team;
+string autocvar_scoreboard_columns;
+var float autocvar_scoreboard_fadeinspeed = 10;
+var float autocvar_scoreboard_fadeoutspeed = 5;
+float autocvar_scoreboard_highlight;
+var float autocvar_scoreboard_highlight_alpha = 0.10;
+var float autocvar_scoreboard_highlight_alpha_self = 0.25;
+float autocvar_scoreboard_offset_left;
+float autocvar_scoreboard_offset_right;
+float autocvar_scr_centerpos;
+float autocvar_scr_centersize;
+float autocvar_scr_centertime;
+float autocvar_v_flipped;
+float autocvar_vid_conheight;
+float autocvar_vid_conwidth;
+float autocvar_vid_pixelheight;
+float autocvar_viewsize;
index c23b425..43255da 100644 (file)
@@ -172,7 +172,7 @@ float BGMScript(entity e)
        if(e.bgmscript == "")
                return 1;
        
-       if(cvar("bgmvolume") <= 0)
+       if(autocvar_bgmvolume <= 0)
                return -1;
 
        e.just_toggled = FALSE;
index 348e4a1..860e829 100644 (file)
@@ -88,7 +88,7 @@ void Ent_Casing(float isNew)
        casing.angles_z = ReadByte() * 360 / 256;
        casing.drawmask = MASK_NORMAL;
 
-       if(cvar("cl_casings") && isNew) {
+       if(autocvar_cl_casings && isNew) {
                casing.draw = Casing_Draw;
                casing.move_origin = casing.origin;
                casing.move_velocity = casing.velocity + 2 * prandomvec();
@@ -104,11 +104,11 @@ void Ent_Casing(float isNew)
                {
                        case 1:
                                setmodel(casing, "models/casing_shell.mdl");
-                               casing.cnt = time + cvar("cl_casings_shell_time");
+                               casing.cnt = time + autocvar_cl_casings_shell_time;
                                break;
                        default:
                                setmodel(casing, "models/casing_bronze.mdl");
-                               casing.cnt = time + cvar("cl_casings_bronze_time");
+                               casing.cnt = time + autocvar_cl_casings_bronze_time;
                                break;
                }
 
@@ -117,7 +117,7 @@ void Ent_Casing(float isNew)
     else
         Casing_Delete();
 
-       RubbleLimit("casing", cvar_or("cl_casings_maxcount",100), Casing_Delete);
+       RubbleLimit("casing", autocvar_cl_casings_maxcount, Casing_Delete);
 }
 
 void Casings_Precache()
index 2e946fc..5793ed8 100644 (file)
@@ -80,7 +80,7 @@ void Net_ReadLightningarc()
     from_x = ReadCoord(); from_y = ReadCoord(); from_z = ReadCoord();
     to_x   = ReadCoord(); to_y   = ReadCoord(); to_z   = ReadCoord();
 
-    if(cvar("cl_effects_lightningarc_simple"))
+    if(autocvar_cl_effects_lightningarc_simple)
     {
         te_lightning1(world,from,to);
     }
@@ -88,11 +88,11 @@ void Net_ReadLightningarc()
     {
         float seglength, drifts, drifte, branchfactor, branchfactor_add;
 
-        seglength    = cvar("cl_effects_lightningarc_segmentlength");
-        drifts       = cvar("cl_effects_lightningarc_drift_start");
-        drifte       = cvar("cl_effects_lightningarc_drift_end");
-        branchfactor = cvar("cl_effects_lightningarc_branchfactor_start");
-        branchfactor = cvar("cl_effects_lightningarc_branchfactor_add");
+        seglength    = autocvar_cl_effects_lightningarc_segmentlength;
+        drifts       = autocvar_cl_effects_lightningarc_drift_start;
+        drifte       = autocvar_cl_effects_lightningarc_drift_end;
+        branchfactor = autocvar_cl_effects_lightningarc_branchfactor_start;
+        branchfactor = autocvar_cl_effects_lightningarc_branchfactor_add;
 
         cl_effetcs_lightningarc(from,to,seglength,drifts,drifte,branchfactor,branchfactor_add);
     }
index 6f6e143..1f8af46 100644 (file)
@@ -51,7 +51,7 @@ void Gib_setmodel(entity gib, string mdlname, float specnum)
 void new_te_bloodshower (float ef, vector org, float explosionspeed, float howmany)
 {
        float i, pmod;
-       pmod = cvar("cl_particles_quality");
+       pmod = autocvar_cl_particles_quality;
        for (i = 0; i < 250 * pmod; ++i)
                pointparticles(ef, org, randomvec() * explosionspeed, howmany / 250);
 }
@@ -125,15 +125,15 @@ void TossGib (string mdlname, vector org, vector vconst, vector vrand, float spe
                gib.move_touch = SUB_RemoveOnNoImpact;
 
        gib.move_origin = gib.origin = org;
-       gib.move_velocity = vconst * cvar_or("cl_gibs_velocity_scale", 1) + vrand * cvar_or("cl_gibs_velocity_random", 1) + '0 0 1' * cvar("cl_gibs_velocity_up");
+       gib.move_velocity = vconst * autocvar_cl_gibs_velocity_scale + vrand * autocvar_cl_gibs_velocity_random + '0 0 1' * autocvar_cl_gibs_velocity_up;
        gib.move_avelocity = prandomvec() * vlen(gib.move_velocity);
        gib.move_time = time;
-       gib.damageforcescale = cvar_or("cl_gibs_damageforcescale", 3.5);
+       gib.damageforcescale = autocvar_cl_gibs_damageforcescale;
 
-       gib.nextthink = time + cvar_or("cl_gibs_lifetime", 14) * (1 + prandom() * 0.15);
+       gib.nextthink = time + autocvar_cl_gibs_lifetime * (1 + prandom() * 0.15);
        gib.drawmask = MASK_NORMAL;
 
-       RubbleLimit("gib", cvar_or("cl_gibs_maxcount",100), Gib_Delete);
+       RubbleLimit("gib", autocvar_cl_gibs_maxcount, Gib_Delete);
 }
 
 void Ent_GibSplash(float isNew)
@@ -153,8 +153,8 @@ void Ent_GibSplash(float isNew)
        org_z = ReadShort() * 4 + 2;
        vel = decompressShortVector(ReadShort());
 
-       float cl_gentle_gibs = cvar("cl_gentle_gibs");
-       if(cl_gentle_gibs || cvar("cl_gentle"))
+       float cl_gentle_gibs = autocvar_cl_gentle_gibs;
+       if(cl_gentle_gibs || autocvar_cl_gentle)
                type |= 0x80; // set gentle bit
 
        if(type & 0x80)
@@ -166,16 +166,16 @@ void Ent_GibSplash(float isNew)
                else
                        gentle_prefix = "morphed_";
        }
-       else if(cvar("cl_particlegibs"))
+       else if(autocvar_cl_particlegibs)
        {
                type |= 0x80;
                gentle_prefix = "particlegibs_";
        }
 
-       if not(cl_gentle_gibs || cvar("cl_gentle"))
-               amount *= 1 - cvar("cl_nogibs");
+       if not(cl_gentle_gibs || autocvar_cl_gentle)
+               amount *= 1 - autocvar_cl_nogibs;
 
-       if(cvar("ekg"))
+       if(autocvar_ekg)
                amount *= 5;
 
        if(amount <= 0 || !isNew)
index a995970..09327e3 100644 (file)
@@ -72,7 +72,7 @@ void Draw_GrapplingHook()
 
        InterpolateOrigin_Do();
 
-       s = cvar("cl_gunalign");
+       s = autocvar_cl_gunalign;
        if(s != 1 && s != 2 && s != 4)
                s = 3; // default value
        --s;
index 398df4f..5536cec 100644 (file)
@@ -151,7 +151,7 @@ void centerprint(string strMessage)
 
        centerprint_expire = min(centerprint_expire, time); // if any of the returns happens, this message will fade out
 
-       if(cvar("scr_centertime") <= 0)
+       if(autocvar_scr_centertime <= 0)
                return;
 
        if(strMessage == "")
@@ -210,8 +210,8 @@ void centerprint(string strMessage)
        h = centerprint_fontsize_y*hcount;
 
        havail = vid_conheight;
-       if(cvar("con_chatpos") < 0)
-               havail -= (-cvar("con_chatpos") + cvar("con_chat")) * cvar("con_chatsize"); // avoid overlapping chat
+       if(autocvar_con_chatpos < 0)
+               havail -= (-autocvar_con_chatpos + autocvar_con_chat) * autocvar_con_chatsize; // avoid overlapping chat
        if(havail > vid_conheight - 70)
                havail = vid_conheight - 70; // avoid overlapping HUD
 
@@ -269,7 +269,7 @@ void centerprint(string strMessage)
 
        centerprint_num = i;
 
-       centerprint_expire = time + cvar("scr_centertime");
+       centerprint_expire = time + autocvar_scr_centertime;
 }
 
 void HUD_DrawCenterPrint (void)
@@ -289,7 +289,7 @@ void HUD_DrawCenterPrint (void)
 
        sz = 0.8 + (a / 5);
 
-       if(centerprint_num * cvar("scr_centersize") > 24 && scoreboard_active) // 24 = height of Scoreboard text
+       if(centerprint_num * autocvar_scr_centersize > 24 && scoreboard_active) // 24 = height of Scoreboard text
                centerprint_start_y = scoreboard_bottom + centerprint_fontsize_y;
 
        pos = centerprint_start;
@@ -427,7 +427,7 @@ HUD panels
 void HUD_Panel_ExportCfg(string cfgname)
 {
        float fh;
-       string filename = strcat("hud_", cvar_string("hud_skin"), "_", cfgname, ".cfg");
+       string filename = strcat("hud_", autocvar_hud_skin, "_", cfgname, ".cfg");
        fh = fopen(filename, FILE_WRITE);
        if(fh >= 0)
        {
@@ -843,8 +843,8 @@ void HUD_Panel_SetPosSize(vector mySize)
 
        if(highlightedPanel == HUD_PANEL_CHAT) // some panels have their own restrictions, like the chat panel (which actually only moves the engine chat print around). Looks bad if it's too small.
        {
-               mySize_x = max(17 * cvar("con_chatsize"), mySize_x);
-               mySize_y = max(2 * cvar("con_chatsize") + 2 * panel_bg_padding, mySize_y);
+               mySize_x = max(17 * autocvar_con_chatsize, mySize_x);
+               mySize_y = max(2 * autocvar_con_chatsize + 2 * panel_bg_padding, mySize_y);
        }
 
        // collision testing|
@@ -932,7 +932,7 @@ void HUD_Panel_Arrow_Action(float nPrimary)
        if (highlightedPanel_prev == -1 || mouseClicked)
                return;
 
-       hud_configure_checkcollisions = (!(hudShiftState & S_CTRL) && cvar("hud_configure_checkcollisions"));
+       hud_configure_checkcollisions = (!(hudShiftState & S_CTRL) && autocvar_hud_configure_checkcollisions);
 
        float step;
        if(autocvar_hud_configure_grid)
@@ -1349,7 +1349,7 @@ void HUD_Panel_Mouse()
        /*
        print("menu_enabled: ", ftos(menu_enabled), "\n");
        print("Highlighted: ", ftos(highlightedPanel), "\n");
-       print("Menu alpha: ", cvar_string("_menu_alpha"), "\n");
+       print("Menu alpha: ", ftos(autocvar__menu_alpha), "\n");
        */
 
        // instantly hide the editor cursor if we open the HUDExit dialog
@@ -1365,7 +1365,7 @@ void HUD_Panel_Mouse()
        if(highlightedPanel != -1)
                highlightedPanel_prev = highlightedPanel;
 
-       mousepos = mousepos + getmousepos() * cvar("menu_mouse_speed");
+       mousepos = mousepos + getmousepos() * autocvar_menu_mouse_speed;
 
        mousepos_x = bound(0, mousepos_x, vid_conwidth);
        mousepos_y = bound(0, mousepos_y, vid_conheight);
@@ -1384,7 +1384,7 @@ void HUD_Panel_Mouse()
 
                if (prev_pos != panel_pos || prev_size != panel_size)
                {
-                       hud_configure_checkcollisions = (!(hudShiftState & S_CTRL) && cvar("hud_configure_checkcollisions"));
+                       hud_configure_checkcollisions = (!(hudShiftState & S_CTRL) && autocvar_hud_configure_checkcollisions);
                        // backup!
                        panel_pos_backup = prev_pos;
                        panel_size_backup = prev_size;
@@ -1442,13 +1442,13 @@ void HUD_Panel_Mouse()
        cursorsize = '32 32 0';
 
        if(highlightcheck == 0)
-               drawpic(mousepos, strcat("gfx/menu/", cvar_string("menu_skin"), "/cursor.tga"), '32 32 0', '1 1 1', hud_fade_alpha, DRAWFLAG_NORMAL);
+               drawpic(mousepos, strcat("gfx/menu/", autocvar_menu_skin, "/cursor.tga"), '32 32 0', '1 1 1', hud_fade_alpha, DRAWFLAG_NORMAL);
        else if(highlightcheck == 1)
-               drawpic(mousepos - cursorsize * 0.5, strcat("gfx/menu/", cvar_string("menu_skin"), "/cursor_move.tga"), '32 32 0', '1 1 1', hud_fade_alpha, DRAWFLAG_NORMAL);
+               drawpic(mousepos - cursorsize * 0.5, strcat("gfx/menu/", autocvar_menu_skin, "/cursor_move.tga"), '32 32 0', '1 1 1', hud_fade_alpha, DRAWFLAG_NORMAL);
        else if(highlightcheck == 2)
-               drawpic(mousepos - cursorsize * 0.5, strcat("gfx/menu/", cvar_string("menu_skin"), "/cursor_resize.tga"), '32 32 0', '1 1 1', hud_fade_alpha, DRAWFLAG_NORMAL);
+               drawpic(mousepos - cursorsize * 0.5, strcat("gfx/menu/", autocvar_menu_skin, "/cursor_resize.tga"), '32 32 0', '1 1 1', hud_fade_alpha, DRAWFLAG_NORMAL);
        else
-               drawpic(mousepos - cursorsize * 0.5, strcat("gfx/menu/", cvar_string("menu_skin"), "/cursor_resize2.tga"), '32 32 0', '1 1 1', hud_fade_alpha, DRAWFLAG_NORMAL);
+               drawpic(mousepos - cursorsize * 0.5, strcat("gfx/menu/", autocvar_menu_skin, "/cursor_resize2.tga"), '32 32 0', '1 1 1', hud_fade_alpha, DRAWFLAG_NORMAL);
 
        prevMouseClicked = mouseClicked;
 }
@@ -1523,9 +1523,9 @@ void HUD_Weapons(void)
        if(!autocvar_hud_panel_weapons && !autocvar__hud_configure)
                return;
 
-       float timeout = cvar("hud_panel_weapons_timeout");
+       float timeout = autocvar_hud_panel_weapons_timeout;
        float timeout_effect_length, timein_effect_length;
-       if (cvar("hud_panel_weapons_timeout_effect") == 0)
+       if (autocvar_hud_panel_weapons_timeout_effect == 0)
        {
                timeout_effect_length = 0;
                timein_effect_length = 0;
@@ -1548,12 +1548,12 @@ void HUD_Weapons(void)
        if (timeout && time >= weapontime + timeout && !autocvar__hud_configure)
        {
                f = (time - (weapontime + timeout)) / timeout_effect_length;
-               if (cvar("hud_panel_weapons_timeout_effect"))
+               if (autocvar_hud_panel_weapons_timeout_effect)
                {
                        panel_bg_alpha *= (1 - f);
                        panel_fg_alpha *= (1 - f);
                }
-               if (cvar("hud_panel_weapons_timeout_effect") == 1)
+               if (autocvar_hud_panel_weapons_timeout_effect == 1)
                {
                        f *= f; // for a cooler movement
                        center_x = panel_pos_x + panel_size_x/2;
@@ -1579,12 +1579,12 @@ void HUD_Weapons(void)
        else if (timeout && time < weaponprevtime + timein_effect_length && !autocvar__hud_configure)
        {
                f = (time - weaponprevtime) / timein_effect_length;
-               if (cvar("hud_panel_weapons_timeout_effect"))
+               if (autocvar_hud_panel_weapons_timeout_effect)
                {
                        panel_bg_alpha *= (f);
                        panel_fg_alpha *= (f);
                }
-               if (cvar("hud_panel_weapons_timeout_effect") == 1)
+               if (autocvar_hud_panel_weapons_timeout_effect == 1)
                {
                        f *= f; // for a cooler movement
                        f = 1 - f;
@@ -1618,14 +1618,14 @@ void HUD_Weapons(void)
        }
 
        // TODO make this configurable
-       if(weaponorder_bypriority != cvar_string("cl_weaponpriority"))
+       if(weaponorder_bypriority != autocvar_cl_weaponpriority)
        {
                if(weaponorder_bypriority)
                        strunzone(weaponorder_bypriority);
                if(weaponorder_byimpulse)
                        strunzone(weaponorder_byimpulse);
 
-               weaponorder_bypriority = strzone(cvar_string("cl_weaponpriority"));
+               weaponorder_bypriority = strzone(autocvar_cl_weaponpriority);
                weaponorder_byimpulse = strzone(W_FixWeaponOrder_BuildImpulseList(W_FixWeaponOrder_ForceComplete(W_NumberWeaponOrder(weaponorder_bypriority))));
                weaponorder_cmp_str = strcat(" ", weaponorder_byimpulse, " ");
 
@@ -1651,7 +1651,7 @@ void HUD_Weapons(void)
                panel_size -= '2 2 0' * panel_bg_padding;
        }
 
-       if(cvar_or("hud_panel_weapons_fade", 1))
+       if(autocvar_hud_panel_weapons_fade)
        {
                wpnalpha = 3.2 - 2 * (time - weapontime);
                wpnalpha = bound(0.7, wpnalpha, 1) * panel_fg_alpha;
@@ -1662,7 +1662,7 @@ void HUD_Weapons(void)
        HUD_Weapons_Clear();
 
        float rows, columns;
-       float aspect = cvar("hud_panel_weapons_aspect");
+       float aspect = autocvar_hud_panel_weapons_aspect;
        rows = panel_size_y/panel_size_x;
        rows = bound(1, floor((sqrt(4 * aspect * rows * WEP_COUNT + rows * rows) + rows + 0.5) / 2), WEP_COUNT);
 
@@ -1671,9 +1671,9 @@ void HUD_Weapons(void)
 
        float a, type, fullammo;
        float when;
-       when = cvar("hud_panel_weapons_complainbubble_time");
+       when = autocvar_hud_panel_weapons_complainbubble_time;
        float fadetime;
-       fadetime = cvar("hud_panel_weapons_complainbubble_fadetime");
+       fadetime = autocvar_hud_panel_weapons_complainbubble_fadetime;
 
        vector color;
        vector wpnpos;
@@ -1684,16 +1684,16 @@ void HUD_Weapons(void)
        float ammo_alpha;
        wpnsize = eX * panel_size_x*(1/columns) + eY * panel_size_y*(1/rows);
        float barsize_x, barsize_y, baroffset_x, baroffset_y;
-       float show_ammo = cvar("hud_panel_weapons_ammo");
+       float show_ammo = autocvar_hud_panel_weapons_ammo;
        if (show_ammo)
        {
-               fullammo_shells = cvar("hud_panel_weapons_ammo_full_shells");
-               fullammo_nails = cvar("hud_panel_weapons_ammo_full_nails");
-               fullammo_rockets = cvar("hud_panel_weapons_ammo_full_rockets");
-               fullammo_cells = cvar("hud_panel_weapons_ammo_full_cells");
-               fullammo_fuel = cvar("hud_panel_weapons_ammo_full_fuel");
-               ammo_color = stov(cvar_string("hud_panel_weapons_ammo_color"));
-               ammo_alpha = panel_fg_alpha * cvar("hud_panel_weapons_ammo_alpha");
+               fullammo_shells = autocvar_hud_panel_weapons_ammo_full_shells;
+               fullammo_nails = autocvar_hud_panel_weapons_ammo_full_nails;
+               fullammo_rockets = autocvar_hud_panel_weapons_ammo_full_rockets;
+               fullammo_cells = autocvar_hud_panel_weapons_ammo_full_cells;
+               fullammo_fuel = autocvar_hud_panel_weapons_ammo_full_fuel;
+               ammo_color = stov(autocvar_hud_panel_weapons_ammo_color);
+               ammo_alpha = panel_fg_alpha * autocvar_hud_panel_weapons_ammo_alpha;
 
 
                if(wpnsize_x/wpnsize_y > aspect)
@@ -1712,7 +1712,7 @@ void HUD_Weapons(void)
 
        float show_accuracy;
        float weapon_stats;
-       if(cvar("hud_panel_weapons_accuracy") && acc_levels)
+       if(autocvar_hud_panel_weapons_accuracy && acc_levels)
        {
                show_accuracy = true;
                if (acc_col_x[0] == -1)
@@ -1721,7 +1721,7 @@ void HUD_Weapons(void)
        }
 
        float weapons_st = getstati(STAT_WEAPONS);
-       float label = cvar("hud_panel_weapons_label");
+       float label = autocvar_hud_panel_weapons_label;
 
        for(i = 0; i < weapon_cnt; ++i)
        {
@@ -1803,7 +1803,7 @@ void HUD_Weapons(void)
                }
 
                // draw the complain message
-               if(time - complain_weapon_time < when + fadetime && self.weapon == complain_weapon && cvar("hud_panel_weapons_complainbubble"))
+               if(time - complain_weapon_time < when + fadetime && self.weapon == complain_weapon && autocvar_hud_panel_weapons_complainbubble)
                {
                        if(fadetime)
                        {
@@ -1823,17 +1823,17 @@ void HUD_Weapons(void)
                        string s;
                        if(complain_weapon_type == 0) {
                                s = "Out of ammo";
-                               color = stov(cvar_string("hud_panel_weapons_complainbubble_color_outofammo"));
+                               color = stov(autocvar_hud_panel_weapons_complainbubble_color_outofammo);
                        }
                        else if(complain_weapon_type == 1) {
                                s = "Don't have";
-                               color = stov(cvar_string("hud_panel_weapons_complainbubble_color_donthave"));
+                               color = stov(autocvar_hud_panel_weapons_complainbubble_color_donthave);
                        }
                        else {
                                s = "Unavailable";
-                               color = stov(cvar_string("hud_panel_weapons_complainbubble_color_unavailable"));
+                               color = stov(autocvar_hud_panel_weapons_complainbubble_color_unavailable);
                        }
-                       float padding = cvar("hud_panel_weapons_complainbubble_padding");
+                       float padding = autocvar_hud_panel_weapons_complainbubble_padding;
                        drawpic_aspect_skin(wpnpos + '1 1 0' * padding, "weapon_complainbubble", wpnsize - '2 2 0' * padding, color, a * panel_fg_alpha, DRAWFLAG_NORMAL);
                        drawstring_aspect(wpnpos + '1 1 0' * padding, s, wpnsize - '2 2 0' * padding, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
                }
@@ -1915,10 +1915,10 @@ void DrawAmmoItem(vector myPos, vector mySize, float itemcode, float currently_s
        if (currently_selected)
                drawpic_aspect_skin(myPos, "ammo_current_bg", mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 
-    if(a > 0 && cvar("hud_panel_ammo_progressbar"))
-        HUD_Panel_DrawProgressBar(myPos + eX * cvar("hud_panel_ammo_progressbar_xoffset") * mySize_x, mySize - eX * cvar("hud_panel_ammo_progressbar_xoffset") * mySize_x, cvar_string("hud_panel_ammo_progressbar_name"), 0, 0, min(1, a/cvar("hud_panel_ammo_maxammo")), color, autocvar_hud_progressbar_alpha * panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
+    if(a > 0 && autocvar_hud_panel_ammo_progressbar)
+        HUD_Panel_DrawProgressBar(myPos + eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize_x, mySize - eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize_x, autocvar_hud_panel_ammo_progressbar_name, 0, 0, min(1, a/autocvar_hud_panel_ammo_maxammo), color, autocvar_hud_progressbar_alpha * panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
 
-    if(cvar("hud_panel_ammo_text"))
+    if(autocvar_hud_panel_ammo_text)
     {
         if(a > 0)
             drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize_x + eY * mySize_y, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
@@ -2127,34 +2127,34 @@ void HUD_Powerups(void) {
     string leftprogressname, rightprogressname;
        float leftcnt, rightcnt;
        float leftexact, rightexact;
-       float flip = cvar("hud_panel_powerups_flip");
+       float flip = autocvar_hud_panel_powerups_flip;
        if (flip) {
                leftname = "strength";
-        leftprogressname = cvar_string("hud_panel_powerups_progressbar_strength");
+        leftprogressname = autocvar_hud_panel_powerups_progressbar_strength;
                leftcnt = ceil(strength_time);
                leftexact = strength_time;
 
                rightname = "shield";
-        rightprogressname = cvar_string("hud_panel_powerups_progressbar_shield");
+        rightprogressname = autocvar_hud_panel_powerups_progressbar_shield;
                rightcnt = ceil(shield_time);
                rightexact = shield_time;
        } else {
                leftname = "shield";
-        leftprogressname = cvar_string("hud_panel_powerups_progressbar_shield");
+        leftprogressname = autocvar_hud_panel_powerups_progressbar_shield;
                leftcnt = ceil(shield_time);
                leftexact = shield_time;
 
                rightname = "strength";
-        rightprogressname = cvar_string("hud_panel_powerups_progressbar_strength");
+        rightprogressname = autocvar_hud_panel_powerups_progressbar_strength;
                rightcnt = ceil(strength_time);
                rightexact = strength_time;
        }
 
        drawfont = hud_bigfont;
-       float baralign = cvar("hud_panel_powerups_baralign");
+       float baralign = autocvar_hud_panel_powerups_baralign;
     float barflip;
-       float iconalign = cvar("hud_panel_powerups_iconalign");
-       float progressbar = cvar("hud_panel_powerups_progressbar");
+       float iconalign = autocvar_hud_panel_powerups_iconalign;
+       float progressbar = autocvar_hud_panel_powerups_progressbar;
        if (mySize_x/mySize_y > 4)
        {
         barsize = eX * 0.5 * mySize_x + eY * mySize_y;
@@ -2173,7 +2173,7 @@ void HUD_Powerups(void) {
                                HUD_Panel_GetProgressBarColorForString(leftname);
                                HUD_Panel_DrawProgressBar(barpos, barsize, leftprogressname, 0, barflip, min(1, leftcnt/30), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
                        }
-            if(cvar("hud_panel_powerups_text"))
+            if(autocvar_hud_panel_powerups_text)
             {
                 if(leftcnt > 1)
                     DrawNumIcon(iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, '1 1 1', 1);
@@ -2197,7 +2197,7 @@ void HUD_Powerups(void) {
                                HUD_Panel_GetProgressBarColorForString(rightname);
                                HUD_Panel_DrawProgressBar(barpos, barsize, rightprogressname, 0, barflip, min(1, rightcnt/30), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
                        }
-            if(cvar("hud_panel_powerups_text"))
+            if(autocvar_hud_panel_powerups_text)
             {
                 if(rightcnt > 1)
                     DrawNumIcon(iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, '1 1 1', 1);
@@ -2223,7 +2223,7 @@ void HUD_Powerups(void) {
                                HUD_Panel_GetProgressBarColorForString(leftname);
                                HUD_Panel_DrawProgressBar(barpos, barsize, leftprogressname, 0, barflip, min(1, leftcnt/30), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
                        }
-            if(cvar("hud_panel_powerups_text"))
+            if(autocvar_hud_panel_powerups_text)
             {
                 if(leftcnt > 1)
                     DrawNumIcon(iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, '1 1 1', 1);
@@ -2246,7 +2246,7 @@ void HUD_Powerups(void) {
                                HUD_Panel_GetProgressBarColorForString(rightname);
                                HUD_Panel_DrawProgressBar(barpos, barsize, rightprogressname, 0, barflip, min(1, rightcnt/30), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
                        }
-            if(cvar("hud_panel_powerups_text"))
+            if(autocvar_hud_panel_powerups_text)
             {
                 if(rightcnt > 1)
                     DrawNumIcon(iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, '1 1 1', 1);
@@ -2280,7 +2280,7 @@ void HUD_Powerups(void) {
                                HUD_Panel_GetProgressBarColorForString(leftname);
                                HUD_Panel_DrawProgressBar(barpos, barsize, leftprogressname, 1, barflip, min(1, leftcnt/30), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
                        }
-            if(cvar("hud_panel_powerups_text"))
+            if(autocvar_hud_panel_powerups_text)
             {
                 if(leftcnt <= 5)
                     drawpic_aspect_skin_expanding(picpos, leftname, '0.4 0.4 0' * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, bound(0, (leftcnt - leftexact) / 0.5, 1));
@@ -2312,7 +2312,7 @@ void HUD_Powerups(void) {
                                HUD_Panel_GetProgressBarColorForString(rightname);
                                HUD_Panel_DrawProgressBar(barpos, barsize, rightprogressname, 1, barflip, min(1, rightcnt/30), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
                        }
-            if(cvar("hud_panel_powerups_text"))
+            if(autocvar_hud_panel_powerups_text)
             {
                 if(rightcnt <= 5)
                     drawpic_aspect_skin_expanding(picpos, rightname, '0.4 0.4 0' * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, bound(0, (rightcnt - rightexact) / 0.5, 1));
@@ -2365,12 +2365,12 @@ void HUD_HealthArmor(void)
        vector numpos;
 
        drawfont = hud_bigfont;
-       float baralign = cvar("hud_panel_healtharmor_baralign");
-       float iconalign = cvar("hud_panel_healtharmor_iconalign");
-       float progressbar = cvar("hud_panel_healtharmor_progressbar");
+       float baralign = autocvar_hud_panel_healtharmor_baralign;
+       float iconalign = autocvar_hud_panel_healtharmor_iconalign;
+       float progressbar = autocvar_hud_panel_healtharmor_progressbar;
 
-    float maxhealth = cvar("hud_panel_healtharmor_maxhealth");
-    float maxarmor = cvar("hud_panel_healtharmor_maxarmor");
+    float maxhealth = autocvar_hud_panel_healtharmor_maxhealth;
+    float maxarmor = autocvar_hud_panel_healtharmor_maxarmor;
        if(autocvar_hud_panel_healtharmor == 2) // combined health and armor display
        {
                vector v;
@@ -2391,10 +2391,10 @@ void HUD_HealthArmor(void)
                        if(progressbar)
                        {
                                HUD_Panel_GetProgressBarColor(health);
-                               HUD_Panel_DrawProgressBar(barpos, barsize, cvar_string("hud_panel_healtharmor_progressbar_health"), 0, mod(baralign, 2), x/maxtotal, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+                               HUD_Panel_DrawProgressBar(barpos, barsize, autocvar_hud_panel_healtharmor_progressbar_health, 0, mod(baralign, 2), x/maxtotal, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                        }
                        if(armor)
-            if(cvar("hud_panel_healtharmor_text"))
+            if(autocvar_hud_panel_healtharmor_text)
                                drawpic_aspect_skin(pos + eX * mySize_x - eX * 0.5 * mySize_y, "armor", '0.5 0.5 0' * mySize_y, '1 1 1', panel_fg_alpha * armor / health, DRAWFLAG_NORMAL);
                }
                else
@@ -2403,13 +2403,13 @@ void HUD_HealthArmor(void)
                        if(progressbar)
                        {
                                HUD_Panel_GetProgressBarColor(armor);
-                               HUD_Panel_DrawProgressBar(barpos, barsize, cvar_string("hud_panel_healtharmor_progressbar_armor"), 0, mod(baralign, 2), x/maxtotal, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+                               HUD_Panel_DrawProgressBar(barpos, barsize, autocvar_hud_panel_healtharmor_progressbar_armor, 0, mod(baralign, 2), x/maxtotal, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                        }
                        if(health)
-            if(cvar("hud_panel_healtharmor_text"))
+            if(autocvar_hud_panel_healtharmor_text)
                                drawpic_aspect_skin(pos + eX * mySize_x - eX * 0.5 * mySize_y, "health", '0.5 0.5 0' * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                }
-        if(cvar("hud_panel_healtharmor_text"))
+        if(autocvar_hud_panel_healtharmor_text)
             DrawNumIcon(iconalign, pos, mySize, x, biggercount, 1, HUD_Get_Num_Color(x, maxtotal), 1);
 
                // fuel
@@ -2429,11 +2429,11 @@ void HUD_HealthArmor(void)
                float leftmax, rightmax;
                float leftactive, rightactive;
                float leftalpha, rightalpha;
-               float flip = cvar("hud_panel_healtharmor_flip");
+               float flip = autocvar_hud_panel_healtharmor_flip;
         float barflip;
                if (flip) { // old style layout with armor left/top of health
                        leftname = "armor";
-            leftprogressname = cvar_string("hud_panel_healtharmor_progressbar_armor");
+            leftprogressname = autocvar_hud_panel_healtharmor_progressbar_armor;
                        leftcnt = armor;
                        if(leftcnt)
                                leftactive = 1;
@@ -2441,21 +2441,21 @@ void HUD_HealthArmor(void)
             leftmax = maxarmor;
 
                        rightname = "health";
-            rightprogressname = cvar_string("hud_panel_healtharmor_progressbar_health");
+            rightprogressname = autocvar_hud_panel_healtharmor_progressbar_health;
                        rightcnt = health;
                        rightactive = 1;
                        rightalpha = 1;
             rightmax = maxhealth;
                } else {
                        leftname = "health";
-            leftprogressname = cvar_string("hud_panel_healtharmor_progressbar_health");
+            leftprogressname = autocvar_hud_panel_healtharmor_progressbar_health;
                        leftcnt = health;
                        leftactive = 1;
                        leftalpha = 1;
             leftmax = maxhealth;
 
                        rightname = "armor";
-            rightprogressname = cvar_string("hud_panel_healtharmor_progressbar_armor");
+            rightprogressname = autocvar_hud_panel_healtharmor_progressbar_armor;
                        rightcnt = armor;
                        if(rightcnt)
                                rightactive = 1;
@@ -2480,7 +2480,7 @@ void HUD_HealthArmor(void)
                                        HUD_Panel_GetProgressBarColorForString(leftname);
                     HUD_Panel_DrawProgressBar(barpos, barsize, leftprogressname, 0, barflip, min(1, leftcnt/leftmax), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                }
-                if(cvar("hud_panel_healtharmor_text"))
+                if(autocvar_hud_panel_healtharmor_text)
                     DrawNumIcon(iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, leftmax), 1);
                        }
 
@@ -2498,7 +2498,7 @@ void HUD_HealthArmor(void)
                                        HUD_Panel_GetProgressBarColorForString(rightname);
                     HUD_Panel_DrawProgressBar(barpos, barsize, rightprogressname, 0, barflip, min(1, rightcnt/rightmax), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                }
-                if(cvar("hud_panel_healtharmor_text"))
+                if(autocvar_hud_panel_healtharmor_text)
                     DrawNumIcon(iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, rightmax), 1);
                        }
 
@@ -2527,7 +2527,7 @@ void HUD_HealthArmor(void)
                                        HUD_Panel_GetProgressBarColorForString(leftname);
                     HUD_Panel_DrawProgressBar(barpos, barsize, leftprogressname, 0, barflip, min(1, leftcnt/leftmax), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                }
-                if(cvar("hud_panel_healtharmor_text"))
+                if(autocvar_hud_panel_healtharmor_text)
                     DrawNumIcon(iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, leftmax), 1);
                        }
 
@@ -2545,7 +2545,7 @@ void HUD_HealthArmor(void)
                                        HUD_Panel_GetProgressBarColorForString(rightname);
                     HUD_Panel_DrawProgressBar(barpos, barsize, rightprogressname, 0, barflip, min(1, rightcnt/rightmax), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                }
-                if(cvar("hud_panel_healtharmor_text"))
+                if(autocvar_hud_panel_healtharmor_text)
                     DrawNumIcon(iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, rightmax), 1);
                        }
 
@@ -2582,7 +2582,7 @@ void HUD_HealthArmor(void)
                                        HUD_Panel_GetProgressBarColorForString(leftname);
                     HUD_Panel_DrawProgressBar(barpos, barsize, leftprogressname, 1, barflip, min(1, leftcnt/leftmax), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                }
-                if(cvar("hud_panel_healtharmor_text"))
+                if(autocvar_hud_panel_healtharmor_text)
                 {
                     drawpic_aspect_skin(picpos, leftname, '0.4 0.4 0' * mySize_x, '1 1 1', leftalpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                     drawstring_aspect(numpos, ftos(leftcnt), eX * 0.5 * mySize_x + eY * 0.25 * mySize_x, HUD_Get_Num_Color(leftcnt, leftmax), panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -2611,7 +2611,7 @@ void HUD_HealthArmor(void)
                                        HUD_Panel_GetProgressBarColorForString(rightname);
                     HUD_Panel_DrawProgressBar(barpos, barsize, rightprogressname, 1, barflip, min(1, rightcnt/rightmax), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                }
-                if(cvar("hud_panel_healtharmor_text"))
+                if(autocvar_hud_panel_healtharmor_text)
                 {
                     drawpic_aspect_skin(picpos, rightname, '0.4 0.4 0' * mySize_x, '1 1 1', rightalpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                     drawstring_aspect(numpos, ftos(rightcnt), eX * 0.5 * mySize_x + eY * 0.25 * mySize_x, HUD_Get_Num_Color(rightcnt, rightmax), panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -2674,8 +2674,8 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s
 {
        float w;
        float alsoprint, gentle;
-       alsoprint = (cvar("hud_panel_notify_print") || !panel_enabled); // print message to console if: notify panel disabled, or cvar to do so enabled
-       gentle = (cvar("cl_gentle") || cvar("cl_gentle_messages"));
+       alsoprint = (autocvar_hud_panel_notify_print || !panel_enabled); // print message to console if: notify panel disabled, or cvar to do so enabled
+       gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages);
        
        if ((msg == MSG_SUICIDE || msg == MSG_KILL || msg == MSG_KILL_ACTION) && gametype == GAME_CTS) // selfkill isn't interesting in CTS and only spams up the notify panel
                return;
@@ -3042,7 +3042,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s
 void HUD_Centerprint(string s1, string s2, float type, float msg)
 {
        float gentle;
-       gentle = (cvar("cl_gentle") || cvar("cl_gentle_messages"));
+       gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages);
        if(msg == MSG_SUICIDE) {
                if (type == DEATH_TEAMCHANGE) {
                        centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "You are now on: ", s1));
@@ -3153,9 +3153,9 @@ void HUD_Notify (void)
 
        float a;
        float when;
-       when = cvar("hud_panel_notify_time");
+       when = autocvar_hud_panel_notify_time;
        float fadetime;
-       fadetime = cvar("hud_panel_notify_fadetime");
+       fadetime = autocvar_hud_panel_notify_fadetime;
 
        string s;
 
@@ -3165,7 +3165,7 @@ void HUD_Notify (void)
        string attacker, victim;
 
        float i, j, w, step, limit;
-       if(cvar("hud_panel_notify_flip")) //order items from the top down
+       if(autocvar_hud_panel_notify_flip) //order items from the top down
        {
                i = 0;
                step = +1;
@@ -3920,7 +3920,7 @@ void HUD_VoteWindow(void)
        if(!autocvar__hud_configure)
        {
                panel_fg_alpha = autocvar_hud_panel_fg_alpha;
-               panel_bg_alpha_str = cvar_string("hud_panel_vote_bg_alpha");
+               panel_bg_alpha_str = autocvar_hud_panel_vote_bg_alpha;
 
                if(panel_bg_alpha_str == "") {
                        panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha);
@@ -3964,7 +3964,7 @@ void HUD_VoteWindow(void)
        pos = panel_pos;
        mySize = panel_size;
 
-       a = vote_alpha * bound(cvar("hud_panel_vote_alreadyvoted_alpha"), 1 - vote_highlighted, 1);
+       a = vote_alpha * bound(autocvar_hud_panel_vote_alreadyvoted_alpha, 1 - vote_highlighted, 1);
        HUD_Panel_DrawBg(a);
        a = panel_fg_alpha * a;
 
@@ -4483,9 +4483,9 @@ void HUD_Mod_Race(vector pos, vector mySize)
 
        if(score && (score < t || !t)) {
                db_put(ClientProgsDB, strcat(shortmapname, rr, "time"), ftos(score));
-               if(cvar("cl_autodemo_delete_keeprecords"))
+               if(autocvar_cl_autodemo_delete_keeprecords)
                {
-                       f = cvar("cl_autodemo_delete");
+                       f = autocvar_cl_autodemo_delete;
                        f &~= 1;
                        cvar_set("cl_autodemo_delete", ftos(f)); // don't delete demo with new record!
                }
@@ -4674,7 +4674,7 @@ void HUD_DrawPressedKeys(void)
        }
 
        // force custom aspect
-       float aspect = cvar("hud_panel_pressedkeys_aspect");
+       float aspect = autocvar_hud_panel_pressedkeys_aspect;
        if(aspect)
        {
                vector newSize;
@@ -4755,20 +4755,20 @@ void HUD_Chat(void)
        cvar_set("con_chatrect_y", ftos(pos_y/vid_conheight));
 
        cvar_set("con_chatwidth", ftos(mySize_x/vid_conwidth));
-       cvar_set("con_chat", ftos(floor(mySize_y/cvar("con_chatsize") - 0.5)));
+       cvar_set("con_chat", ftos(floor(mySize_y/autocvar_con_chatsize - 0.5)));
 
        if(autocvar__hud_configure)
        {
                float chatsize;
-               chatsize = cvar("con_chatsize");
+               chatsize = autocvar_con_chatsize;
                cvar_set("con_chatrect_x", "9001"); // over 9000, we'll fake it instead for more control over alpha and such
                float i, a;
-               for(i = 0; i < cvar("con_chat"); ++i)
+               for(i = 0; i < autocvar_con_chat; ++i)
                {
-                       if(i == cvar("con_chat") - 1)
+                       if(i == autocvar_con_chat - 1)
                                a = panel_fg_alpha;
                        else
-                               a = panel_fg_alpha * floor(((i + 1) * 7 + cvar("con_chattime"))/45);
+                               a = panel_fg_alpha * floor(((i + 1) * 7 + autocvar_con_chattime)/45);
                        drawcolorcodedstring(pos + eY * i * chatsize, textShortenToWidth("^3Player^7: This is the chat area.", mySize_x, '1 1 0' * chatsize, stringwidth_colors), '1 1 0' * chatsize, a, DRAWFLAG_NORMAL);
                }
        }
@@ -4822,7 +4822,7 @@ void HUD_EngineInfo(void)
        else
        {
                framecounter += 1;
-               if(currentTime - prevfps_time > cvar("hud_panel_engineinfo_framecounter_time"))
+               if(currentTime - prevfps_time > autocvar_hud_panel_engineinfo_framecounter_time)
                {
                        prevfps = framecounter/(currentTime - prevfps_time);
                        framecounter = 0;
@@ -4833,7 +4833,7 @@ void HUD_EngineInfo(void)
        vector color;
        color = HUD_Get_Num_Color (prevfps, 100);
        drawfont = hud_bigfont;
-       drawstring_aspect(pos, strcat("FPS: ", ftos_decimals(prevfps, cvar("hud_panel_engineinfo_framecounter_decimals"))), mySize, color, panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawstring_aspect(pos, strcat("FPS: ", ftos_decimals(prevfps, autocvar_hud_panel_engineinfo_framecounter_decimals)), mySize, color, panel_fg_alpha, DRAWFLAG_NORMAL);
        drawfont = hud_font;
 }
 
@@ -5035,7 +5035,7 @@ void HUD_ShowSpeed(void)
        float pos, conversion_factor;
        string speed, zspeed, unit;
 
-       switch(cvar("cl_showspeed_unit"))
+       switch(autocvar_cl_showspeed_unit)
        {
                default:
                case 0:
@@ -5066,13 +5066,13 @@ void HUD_ShowSpeed(void)
 
        speed = strcat(ftos(floor( vlen(pmove_vel - pmove_vel_z * '0 0 1') * conversion_factor + 0.5 )), unit);
 
-       numsize_x = numsize_y = cvar("cl_showspeed_size");
-       pos = (vid_conheight - numsize_y) * cvar("cl_showspeed_position");
+       numsize_x = numsize_y = autocvar_cl_showspeed_size;
+       pos = (vid_conheight - numsize_y) * autocvar_cl_showspeed_position;
 
        drawfont = hud_bigfont;
        drawstringcenter(eX + pos * eY, speed, numsize, '1 1 1', autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL);
 
-       if (cvar("cl_showspeed_z") == 1) {
+       if (autocvar_cl_showspeed_z == 1) {
                zspeed = strcat(ftos(fabs(floor( pmove_vel_z * conversion_factor + 0.5 ))), unit);
                drawstringcenter(eX + pos * eY + numsize_y * eY, zspeed, numsize * 0.5, '1 1 1', autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL);
        }
@@ -5092,7 +5092,7 @@ void HUD_ShowAcceleration(void)
        top_y = 0;
 
        f = time - acc_prevtime;
-       if(cvar("cl_showacceleration_z"))
+       if(autocvar_cl_showacceleration_z)
                acceleration = (vlen(pmove_vel) - vlen(acc_prevspeed)) * (1 / f);
        else
                acceleration = (vlen(pmove_vel - '0 0 1' * pmove_vel_z) - vlen(acc_prevspeed - '0 0 1' * acc_prevspeed_z)) * (1 / f);
@@ -5105,13 +5105,13 @@ void HUD_ShowAcceleration(void)
        if (acceleration == 0)
                return;
 
-       pos = top - sz/2 * eY + (cvar("cl_showacceleration_position") * vid_conheight) * eY;
+       pos = top - sz/2 * eY + (autocvar_cl_showacceleration_position * vid_conheight) * eY;
 
-       sz = cvar("cl_showacceleration_size");
-       scale = cvar("cl_showacceleration_scale");
-       alpha = cvar("cl_showacceleration_alpha");
-       if (cvar("cl_showacceleration_color_custom"))
-               rgb = stov(cvar_string("cl_showacceleration_color"));
+       sz = autocvar_cl_showacceleration_size;
+       scale = autocvar_cl_showacceleration_scale;
+       alpha = autocvar_cl_showacceleration_alpha;
+       if (autocvar_cl_showacceleration_color_custom)
+               rgb = stov(autocvar_cl_showacceleration_color);
        else {
                if (acceleration < 0)
                        rgb = '1 .5 .5' - '0 .5 .5' * bound(0, -acceleration * 0.2, 1);
@@ -5191,11 +5191,11 @@ void HUD_Main (void)
                return;
 
        // Drawing stuff
-       if (hud_skin_path != cvar_string("hud_skin"))
+       if (hud_skin_path != autocvar_hud_skin)
        {
                if (hud_skin_path)
                        strunzone(hud_skin_path);
-               hud_skin_path = strzone(strcat("gfx/hud/", cvar_string("hud_skin")));
+               hud_skin_path = strzone(strcat("gfx/hud/", autocvar_hud_skin));
        }
 
        // HUD configure visible grid
@@ -5218,7 +5218,7 @@ void HUD_Main (void)
        {
                float f;
                vector color;
-               float hud_dock_color_team = cvar("hud_dock_color_team");
+               float hud_dock_color_team = autocvar_hud_dock_color_team;
                if((teamplay) && hud_dock_color_team) {
                        f = stof(getplayerkey(player_localentnum - 1, "colors"));
                        color = colormapPaletteColor(mod(f, 16), 1) * hud_dock_color_team;
@@ -5228,7 +5228,7 @@ void HUD_Main (void)
                }
                else
                {
-                       string hud_dock_color = cvar_string("hud_dock_color");
+                       string hud_dock_color = autocvar_hud_dock_color;
                        if(hud_dock_color == "shirt") {
                                f = stof(getplayerkey(player_localentnum - 1, "colors"));
                                color = colormapPaletteColor(floor(f / 16), 0);
@@ -5249,7 +5249,7 @@ void HUD_Main (void)
                                pic = "gfx/hud/default/dock_medium";
                        }
                }
-               drawpic('0 0 0', pic, eX * vid_conwidth + eY * vid_conheight, color, cvar("hud_dock_alpha") * hud_fade_alpha, DRAWFLAG_NORMAL); // no aspect ratio forcing on dock...
+               drawpic('0 0 0', pic, eX * vid_conwidth + eY * vid_conheight, color, autocvar_hud_dock_alpha * hud_fade_alpha, DRAWFLAG_NORMAL); // no aspect ratio forcing on dock...
        }
 
        // cache the panel order into the panel_order array
@@ -5273,9 +5273,9 @@ void HUD_Main (void)
                HUD_Chat(); // HUD_DrawPanel(HUD_PANEL_CHAT);
 
        // TODO hud_'ify these
-       if (cvar("cl_showspeed"))
+       if (autocvar_cl_showspeed)
                HUD_ShowSpeed();
-       if (cvar("cl_showacceleration"))
+       if (autocvar_cl_showacceleration)
                HUD_ShowAcceleration();
 
        if (autocvar__hud_configure && spectatee_status && hud_configure_prev == -1) // try to join if we are in hud_configure mode, but still spectating, and in the first frame (in order to get rid of motd when launching a server via the menu "HUD Setup" button)
index 40fcfda..8ff4817 100644 (file)
@@ -172,9 +172,9 @@ void MapVote_Draw()
        xmin = vid_conwidth*0.05; // 5% border must suffice
        xmax = vid_conwidth - xmin;
        ymin = 20;
-       i = cvar("con_chatpos"); //*cvar("con_chatsize");
+       i = autocvar_con_chatpos; //*autocvar_con_chatsize;
        if(i < 0)
-               ymax = vid_conheight + (i - cvar("con_chat")) * cvar("con_chatsize");
+               ymax = vid_conheight + (i - autocvar_con_chat) * autocvar_con_chatsize;
        if(i >= 0 || ymax < (vid_conheight*0.5))
                ymax = vid_conheight - ymin;
 
@@ -244,7 +244,7 @@ void MapVote_Draw()
                MapVote_DrawAbstain(pos, isize, xmax - xmin, tmp, i);
        }
 
-       drawpic(mv_mousepos, strcat("gfx/menu/", cvar_string("menu_skin"), "/cursor.tga"), '32 32 0', '1 1 1', autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic(mv_mousepos, strcat("gfx/menu/", autocvar_menu_skin, "/cursor.tga"), '32 32 0', '1 1 1', autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL);
 }
 
 void Cmd_MapVote_MapDownload(float argc)
index b37e209..57e2581 100644 (file)
@@ -8,7 +8,7 @@ void serverAnnouncer()
        // check for pending announcement, play it and remove it
        if(announce_snd != "")
        {
-               sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/", announce_snd, ".wav"), VOL_BASEVOICE, ATTN_NONE);
+               sound(world, CHAN_AUTO, strcat("announcer/", autocvar_cl_announcer, "/", announce_snd, ".wav"), VOL_BASEVOICE, ATTN_NONE);
                strunzone(announce_snd);
                announce_snd = "";
        }
@@ -22,7 +22,7 @@ void restartAnnouncer_Think() {
                if (!spectatee_status) //do cprint only for players
                        centerprint("^1Begin!");
 
-               sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/begin.wav"), VOL_BASEVOICE, ATTN_NONE);
+               sound(world, CHAN_AUTO, strcat("announcer/", autocvar_cl_announcer, "/begin.wav"), VOL_BASEVOICE, ATTN_NONE);
                //reset maptime announcers now as well
                announcer_5min = announcer_1min = FALSE;
 
@@ -34,7 +34,7 @@ void restartAnnouncer_Think() {
                        centerprint(strcat("^1Game starts in ", ftos(countdown_rounded), " seconds"));
 
                if(countdown_rounded <= 3 && countdown_rounded >= 1) {
-                       sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/", ftos(countdown_rounded), ".wav"), VOL_BASEVOICE, ATTN_NONE);
+                       sound(world, CHAN_AUTO, strcat("announcer/", autocvar_cl_announcer, "/", ftos(countdown_rounded), ".wav"), VOL_BASEVOICE, ATTN_NONE);
                }
 
                self.nextthink = getstatf(STAT_GAMESTARTTIME) - (countdown - 1);
@@ -53,14 +53,14 @@ void maptimeAnnouncer() {
        float warmuplimit;
        float warmuptimeleft;
        if(warmup_stage) {
-               warmuplimit = cvar("g_warmup_limit");
+               warmuplimit = autocvar_g_warmup_limit;
                if(warmuplimit > 0) {
                        warmuptimeleft = max(0, warmuplimit + getstatf(STAT_GAMESTARTTIME) - time); 
                }
        }
 
        //5 minute check
-       if (cvar("cl_sound_maptime_warning") >= 2) {
+       if (autocvar_cl_sound_maptime_warning >= 2) {
                //make sure that after connect (and e.g. 4 minutes left) we will not get a wrong sound
                if(announcer_5min)
                {
@@ -72,12 +72,12 @@ void maptimeAnnouncer() {
                        if not (warmuplimit == -1 && warmup_stage) {
                                announcer_5min = TRUE;
                                //dprint("i will play the sound, I promise!\n");
-                               sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/5minutesremain.wav"), VOL_BASEVOICE, ATTN_NONE);
+                               sound(world, CHAN_AUTO, strcat("announcer/", autocvar_cl_announcer, "/5minutesremain.wav"), VOL_BASEVOICE, ATTN_NONE);
                        }
        }
 
        //1 minute check
-       if (cvar("cl_sound_maptime_warning") == 1 || cvar("cl_sound_maptime_warning") == 3) {
+       if (autocvar_cl_sound_maptime_warning == 1 || autocvar_cl_sound_maptime_warning == 3) {
                if (announcer_1min)
                {
                        if(((!warmup_stage || warmuplimit == 0) && timeleft > 60) || (warmup_stage && warmuplimit > 0 && warmuptimeleft > 60))
@@ -87,7 +87,7 @@ void maptimeAnnouncer() {
                        //if we're in warmup mode, check whether there's a warmup timelimit
                        if not (warmuplimit == -1 && warmup_stage) {
                                announcer_1min = TRUE;
-                               sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/1minuteremains.wav"), VOL_BASEVOICE, ATTN_NONE);
+                               sound(world, CHAN_AUTO, strcat("announcer/", autocvar_cl_announcer, "/1minuteremains.wav"), VOL_BASEVOICE, ATTN_NONE);
                        }
        }
 }
@@ -102,7 +102,7 @@ void carrierAnnouncer() {
        float pickup;
        string item;
 
-       if not(cvar("cl_notify_carried_items"))
+       if not(autocvar_cl_notify_carried_items)
                return;
 
        stat_items = getstati(STAT_ITEMS);
@@ -123,11 +123,11 @@ void carrierAnnouncer() {
        if (item)
        {
                if (pickup) {
-                       if (cvar("cl_notify_carried_items") & 2)
+                       if (autocvar_cl_notify_carried_items & 2)
                                centerprint(strcat("You picked up the ", item, "!"));
                }
                else {
-                       if (cvar("cl_notify_carried_items") & 1)
+                       if (autocvar_cl_notify_carried_items & 1)
                                centerprint(strcat("You got the ", item, "!"));
                }
        }
@@ -141,50 +141,50 @@ void carrierAnnouncer() {
  * TODO: announcer queues
  */
 void Announcer_Precache () {
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/1minuteremains.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/5minutesremain.wav"));
-
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/electrobitch.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/airshot.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/03kills.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/05kills.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/10kills.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/15kills.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/20kills.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/25kills.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/30kills.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/botlike.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/yoda.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/amazing.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/awesome.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/headshot.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/impressive.wav"));
-
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/prepareforbattle.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/begin.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/timeoutcalled.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/1fragleft.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/2fragsleft.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/3fragsleft.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/terminated.wav"));
-
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/1.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/2.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/3.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/4.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/5.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/6.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/7.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/8.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/9.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/10.wav"));
-
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/lastsecond.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/narrowly.wav"));
-
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/voteaccept.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/votecall.wav"));
-       precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/votefail.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/1minuteremains.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/5minutesremain.wav"));
+
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/electrobitch.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/airshot.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/03kills.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/05kills.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/10kills.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/15kills.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/20kills.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/25kills.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/30kills.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/botlike.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/yoda.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/amazing.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/awesome.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/headshot.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/impressive.wav"));
+
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/prepareforbattle.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/begin.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/timeoutcalled.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/1fragleft.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/2fragsleft.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/3fragsleft.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/terminated.wav"));
+
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/1.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/2.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/3.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/4.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/5.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/6.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/7.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/8.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/9.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/10.wav"));
+
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/lastsecond.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/narrowly.wav"));
+
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/voteaccept.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/votecall.wav"));
+       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/votefail.wav"));
 }
 
 void AuditLists()
@@ -329,7 +329,7 @@ float PreviewExists(string name)
        float f;
        string file;
 
-       if(cvar("cl_readpicture_force"))
+       if(autocvar_cl_readpicture_force)
                return false;
 
        file = strcat(name, ".tga");
index e9a0263..b33b81a 100644 (file)
@@ -296,7 +296,7 @@ void Net_ReadNexgunBeamParticle()
        //draw either the old v2.3 beam or the new beam
        charge = sqrt(charge); // divide evenly among trail spacing and alpha
        particles_alphamin = particles_alphamax = charge;
-       if (cvar("cl_particles_oldnexbeam") && (getstati(STAT_ALLOW_OLDNEXBEAM) || isdemo()))
+       if (autocvar_cl_particles_oldnexbeam && (getstati(STAT_ALLOW_OLDNEXBEAM) || isdemo()))
                WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("TE_TEI_G3"), shotorg, endpos, charge, 1);
        else
                WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("nex_beam"), shotorg, endpos, charge, 1);
index 0476428..502c448 100644 (file)
@@ -266,7 +266,7 @@ void Cmd_HUD_SetFields(float argc)
 
        // TODO: re enable with gametype dependant cvars?
        if(argc < 2) // no arguments provided
-               argc = tokenizebyseparator(strcat("x ", cvar_string("scoreboard_columns")), " ");
+               argc = tokenizebyseparator(strcat("x ", autocvar_scoreboard_columns), " ");
 
        if(argc < 2)
                argc = tokenizebyseparator(strcat("x ", HUD_DefaultColumnLayout()), " ");
@@ -624,9 +624,9 @@ void HUD_PrintScoreboardItem(vector pos, entity pl, float is_self, float pl_numb
        is_spec = (GetPlayerColor(pl.sv_entnum) == COLOR_SPECTATOR);
 
        if((rgb == '1 1 1') && (!is_spec)) {
-               rgb_x = cvar("scoreboard_color_bg_r") + 0.5;
-               rgb_y = cvar("scoreboard_color_bg_g") + 0.5;
-               rgb_z = cvar("scoreboard_color_bg_b") + 0.5; }
+               rgb_x = autocvar_scoreboard_color_bg_r + 0.5;
+               rgb_y = autocvar_scoreboard_color_bg_g + 0.5;
+               rgb_z = autocvar_scoreboard_color_bg_b + 0.5; }
 
        // Layout:
        tmp_x = sbwidth;
@@ -883,7 +883,7 @@ float HUD_WouldDrawScoreboard() {
                return 1;
        else if (intermission == 1)
                return 1;
-       else if (getstati(STAT_HEALTH) <= 0 && cvar("cl_deathscoreboard"))
+       else if (getstati(STAT_HEALTH) <= 0 && autocvar_cl_deathscoreboard)
                return 1;
        else if (scoreboard_showscores_force)
                return 1;
@@ -897,7 +897,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
        float i;
        float weapon_cnt = WEP_COUNT - 3; // either minstanex/nex are hidden, no port-o-launch, no tuba
        float rows;
-       if(cvar("scoreboard_accuracy_doublerows"))
+       if(autocvar_scoreboard_accuracy_doublerows)
                rows = 2;
        else
                rows = 1;
@@ -1028,9 +1028,9 @@ vector HUD_DrawScoreboardRankings(vector pos, entity pl,  vector rgb, vector bg_
        float is_spec;
        is_spec = (GetPlayerColor(pl.sv_entnum) == COLOR_SPECTATOR);
        vector hl_rgb;
-       hl_rgb_x = cvar("scoreboard_color_bg_r") + 0.5;
-       hl_rgb_y = cvar("scoreboard_color_bg_g") + 0.5;
-       hl_rgb_z = cvar("scoreboard_color_bg_b") + 0.5;
+       hl_rgb_x = autocvar_scoreboard_color_bg_r + 0.5;
+       hl_rgb_y = autocvar_scoreboard_color_bg_g + 0.5;
+       hl_rgb_z = autocvar_scoreboard_color_bg_b + 0.5;
 
        pos_y += hud_fontsize_y;
        drawstring(pos, strcat("Rankings"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
@@ -1080,14 +1080,14 @@ void HUD_DrawScoreboard()
        }
 
        if(hud_woulddrawscoreboard) {
-               float scoreboard_fadeinspeed = cvar_or("scoreboard_fadeinspeed", 10);
+               float scoreboard_fadeinspeed = autocvar_scoreboard_fadeinspeed;
                if (scoreboard_fadeinspeed)
                        scoreboard_fade_alpha = bound (0, (time - hud_woulddrawscoreboard_change) * scoreboard_fadeinspeed, 1);
                else
                        scoreboard_fade_alpha = 1;
        }
        else {
-               float scoreboard_fadeoutspeed = cvar_or("scoreboard_fadeoutspeed", 5);
+               float scoreboard_fadeoutspeed = autocvar_scoreboard_fadeoutspeed;
                if (scoreboard_fadeoutspeed)
                        scoreboard_fade_alpha = bound (0, (1/scoreboard_fadeoutspeed - (time - hud_woulddrawscoreboard_change)) * scoreboard_fadeoutspeed, 1);
                else
@@ -1099,21 +1099,21 @@ void HUD_DrawScoreboard()
 
        HUD_UpdatePlayerTeams();
 
-       scoreboard_alpha_bg = cvar("scoreboard_alpha_bg") * scoreboard_fade_alpha * (1 - autocvar__menu_alpha);
-       scoreboard_alpha_fg = cvar_or("scoreboard_alpha_fg", 1.0) * scoreboard_fade_alpha * (1 - autocvar__menu_alpha);
-       scoreboard_highlight = cvar("scoreboard_highlight");
-       scoreboard_highlight_alpha = cvar_or("scoreboard_highlight_alpha", 0.10) * scoreboard_alpha_fg;
-       scoreboard_highlight_alpha_self = cvar_or("scoreboard_highlight_alpha_self", 0.25) * scoreboard_alpha_fg;
-       scoreboard_alpha_name = cvar_or("scoreboard_alpha_name", 0.9) * scoreboard_alpha_fg;
-       scoreboard_alpha_name_self = cvar_or("scoreboard_alpha_name_self", 1) * scoreboard_alpha_fg;
+       scoreboard_alpha_bg = autocvar_scoreboard_alpha_bg * scoreboard_fade_alpha * (1 - autocvar__menu_alpha);
+       scoreboard_alpha_fg = autocvar_scoreboard_alpha_fg * scoreboard_fade_alpha * (1 - autocvar__menu_alpha);
+       scoreboard_highlight = autocvar_scoreboard_highlight;
+       scoreboard_highlight_alpha = autocvar_scoreboard_highlight_alpha * scoreboard_alpha_fg;
+       scoreboard_highlight_alpha_self = autocvar_scoreboard_highlight_alpha_self * scoreboard_alpha_fg;
+       scoreboard_alpha_name = autocvar_scoreboard_alpha_name * scoreboard_alpha_fg;
+       scoreboard_alpha_name_self = autocvar_scoreboard_alpha_name_self * scoreboard_alpha_fg;
 
        vector rgb, pos, tmp;
        entity pl, tm;
 
-       xmin = cvar("scoreboard_offset_left") * vid_conwidth;
-       ymin = cvar("con_notify") * cvar("con_notifysize");
+       xmin = autocvar_scoreboard_offset_left * vid_conwidth;
+       ymin = autocvar_con_notify * autocvar_con_notifysize;
 
-       xmax = (1 - cvar("scoreboard_offset_right")) * vid_conwidth;
+       xmax = (1 - autocvar_scoreboard_offset_right) * vid_conwidth;
        ymax = vid_conheight - ymin;
 
        sbwidth = xmax - xmin;
@@ -1135,7 +1135,7 @@ void HUD_DrawScoreboard()
        drawfont = hud_font;
 
        // Draw the scoreboard
-       vector bg_size = drawgetimagesize("gfx/scoreboard/scoreboard_bg") * cvar("scoreboard_bg_scale");
+       vector bg_size = drawgetimagesize("gfx/scoreboard/scoreboard_bg") * autocvar_scoreboard_bg_scale;
 
        if(teamplay)
        {
@@ -1155,9 +1155,9 @@ void HUD_DrawScoreboard()
        }
        else
        {
-               rgb_x = cvar("scoreboard_color_bg_r");
-               rgb_y = cvar("scoreboard_color_bg_g");
-               rgb_z = cvar("scoreboard_color_bg_b");
+               rgb_x = autocvar_scoreboard_color_bg_r;
+               rgb_y = autocvar_scoreboard_color_bg_g;
+               rgb_z = autocvar_scoreboard_color_bg_b;
 
                for(tm = teams.sort_next; tm; tm = tm.sort_next)
                {
@@ -1179,7 +1179,7 @@ void HUD_DrawScoreboard()
                }
                pos = HUD_DrawScoreboardRankings(pos, pl, rgb, bg_size);
        }
-       else if(cvar("scoreboard_accuracy") && spectatee_status != -1 && !warmup_stage) {
+       else if(autocvar_scoreboard_accuracy && spectatee_status != -1 && !warmup_stage) {
                if(teamplay)
                        pos = HUD_DrawScoreboardAccuracyStats(pos, GetTeamRGB(myteam), bg_size);
                else
index b195703..5703c14 100644 (file)
@@ -39,7 +39,7 @@ void TargetMusic_Advance()
                        else
                                e.state = 0;
                }
-               vol = e.state * e.volume * cvar("bgmvolume");
+               vol = e.state * e.volume * autocvar_bgmvolume;
                if(vol != vol0)
                {
                        if(vol0 < 0)
index a486af6..cccce76 100644 (file)
@@ -176,11 +176,11 @@ float hud_panel_radar_zoommode;
 
 void teamradar_loadcvars()
 {
-       v_flipped = cvar("v_flipped");
-       hud_panel_radar_scale = cvar("hud_panel_radar_scale");
-       hud_panel_radar_foreground_alpha = cvar("hud_panel_radar_foreground_alpha") * panel_fg_alpha;
-       hud_panel_radar_rotation = cvar("hud_panel_radar_rotation");
-       hud_panel_radar_zoommode = cvar("hud_panel_radar_zoommode");
+       v_flipped = autocvar_v_flipped;
+       hud_panel_radar_scale = autocvar_hud_panel_radar_scale;
+       hud_panel_radar_foreground_alpha = autocvar_hud_panel_radar_foreground_alpha * panel_fg_alpha;
+       hud_panel_radar_rotation = autocvar_hud_panel_radar_rotation;
+       hud_panel_radar_zoommode = autocvar_hud_panel_radar_zoommode;
 
        // others default to 0
        // match this to defaultXonotic.cfg!
index cf33b01..5f12285 100644 (file)
@@ -5,7 +5,7 @@
 void Ent_TubaNote_Think()
 {
        float f;
-       f = cvar("g_balance_tuba_fadetime");
+       f = autocvar_g_balance_tuba_fadetime;
        if(f > 0)
                self.cnt -= frametime * self.count / f;
        else
@@ -17,14 +17,14 @@ void Ent_TubaNote_Think()
                remove(self);
        }
        else
-               sound(self, CHAN_PROJECTILE, "", self.cnt, self.attenuate * cvar("g_balance_tuba_attenuation"));
+               sound(self, CHAN_PROJECTILE, "", self.cnt, self.attenuate * autocvar_g_balance_tuba_attenuation);
 }
 
 void Ent_TubaNote_UpdateSound()
 {
-       self.enemy.cnt = bound(0, VOL_BASE * cvar("g_balance_tuba_volume"), 1);
+       self.enemy.cnt = bound(0, VOL_BASE * autocvar_g_balance_tuba_volume, 1);
        self.enemy.count = self.enemy.cnt;
-       sound(self.enemy, CHAN_PROJECTILE, TUBA_STARTNOTE(self.cnt), self.enemy.cnt, self.enemy.attenuate * cvar("g_balance_tuba_attenuation"));
+       sound(self.enemy, CHAN_PROJECTILE, TUBA_STARTNOTE(self.cnt), self.enemy.cnt, self.enemy.attenuate * autocvar_g_balance_tuba_attenuation);
 }
 
 void Ent_TubaNote_StopSound()
index f53c60f..0a0bfa9 100644 (file)
@@ -17,7 +17,7 @@ void Ent_Wall_Draw()
 
        if(self.lodmodelindex1)
        {
-               d = cvar("loddebug");
+               d = autocvar_loddebug;
                if(d > 0)
                {
                        if(d == 1)
index 816a2e4..8584d24 100644 (file)
@@ -119,11 +119,11 @@ void Draw_WaypointSprite()
        if(self.hideflags & 2)
                return; // radar only
 
-       if(cvar("cl_hidewaypoints") >= 2)
+       if(autocvar_cl_hidewaypoints >= 2)
                return;
 
        if(self.hideflags & 1)
-               if(cvar("cl_hidewaypoints"))
+               if(autocvar_cl_hidewaypoints)
                        return; // fixed waypoint
 
        InterpolateOrigin_Do();
@@ -198,7 +198,7 @@ void Draw_WaypointSprite()
                d = o - '0.5 0 0' * vid_conwidth - '0 0.5 0' * vid_conheight;
 
                /*
-               if(cvar("v_flipped"))
+               if(autocvar_v_flipped)
                        d_x = -d_x;
                */
 
@@ -410,22 +410,22 @@ void Ent_WaypointSprite()
 void WaypointSprite_Load()
 {
        waypointsprite_fadedistance = vlen(mi_max - mi_min);
-       waypointsprite_normdistance = cvar("g_waypointsprite_normdistance");
-       waypointsprite_minscale = cvar("g_waypointsprite_minscale");
-       waypointsprite_minalpha = cvar("g_waypointsprite_minalpha");
-       waypointsprite_distancealphaexponent = cvar("g_waypointsprite_distancealphaexponent");
-       waypointsprite_timealphaexponent = cvar("g_waypointsprite_timealphaexponent");
-       waypointsprite_scale = cvar_or("g_waypointsprite_scale", 1);
-       waypointsprite_edgefadealpha = cvar_or("g_waypointsprite_edgefadealpha", 1);
-       waypointsprite_edgefadescale = cvar_or("g_waypointsprite_edgefadescale", 1);
-       waypointsprite_edgefadedistance = cvar("g_waypointsprite_edgefadedistance");
-       waypointsprite_crosshairfadealpha = cvar_or("g_waypointsprite_crosshairfadealpha", 1);
-       waypointsprite_crosshairfadescale = cvar_or("g_waypointsprite_crosshairfadescale", 1);
-       waypointsprite_crosshairfadedistance = cvar("g_waypointsprite_crosshairfadedistance");
-       waypointsprite_distancefadealpha = cvar_or("g_waypointsprite_distancefadealpha", 1);
-       waypointsprite_distancefadescale = cvar_or("g_waypointsprite_distancefadescale", 1);
-       waypointsprite_distancefadedistance = vlen(mi_max - mi_min) * cvar_or("g_waypointsprite_distancefadedistancemultiplier", 1);
-       waypointsprite_alpha = cvar_or("g_waypointsprite_alpha", 1) * (1 - autocvar__menu_alpha);
+       waypointsprite_normdistance = autocvar_g_waypointsprite_normdistance;
+       waypointsprite_minscale = autocvar_g_waypointsprite_minscale;
+       waypointsprite_minalpha = autocvar_g_waypointsprite_minalpha;
+       waypointsprite_distancealphaexponent = autocvar_g_waypointsprite_distancealphaexponent;
+       waypointsprite_timealphaexponent = autocvar_g_waypointsprite_timealphaexponent;
+       waypointsprite_scale = autocvar_g_waypointsprite_scale;
+       waypointsprite_edgefadealpha = autocvar_g_waypointsprite_edgefadealpha;
+       waypointsprite_edgefadescale = autocvar_g_waypointsprite_edgefadescale;
+       waypointsprite_edgefadedistance = autocvar_g_waypointsprite_edgefadedistance;
+       waypointsprite_crosshairfadealpha = autocvar_g_waypointsprite_crosshairfadealpha;
+       waypointsprite_crosshairfadescale = autocvar_g_waypointsprite_crosshairfadescale;
+       waypointsprite_crosshairfadedistance = autocvar_g_waypointsprite_crosshairfadedistance;
+       waypointsprite_distancefadealpha = autocvar_g_waypointsprite_distancefadealpha;
+       waypointsprite_distancefadescale = autocvar_g_waypointsprite_distancefadescale;
+       waypointsprite_distancefadedistance = vlen(mi_max - mi_min) * autocvar_g_waypointsprite_distancefadedistancemultiplier;
+       waypointsprite_alpha = autocvar_g_waypointsprite_alpha * (1 - autocvar__menu_alpha);
 
        if(!waypointsprite_initialized)
        {
index 5e7eb70..1da6ad3 100644 (file)
@@ -153,7 +153,7 @@ void anticheat_prethink()
 
 void anticheat_report()
 {
-       if(!cvar("sv_eventlog"))
+       if(!autocvar_sv_eventlog)
                return;
        GameLogEcho(strcat(":anticheat:speedhack:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_speedhack))));
        GameLogEcho(strcat(":anticheat:div0_strafebot_old:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_div0_strafebot_old))));
index fbabbcf..5110d37 100644 (file)
@@ -41,15 +41,15 @@ void reset_map(float dorespawn)
        entity oldself;
        oldself = self;
 
-       if(g_arena && cvar("g_arena_warmup"))
-               warmup = time + cvar("g_arena_warmup");
+       if(g_arena && autocvar_g_arena_warmup)
+               warmup = time + autocvar_g_arena_warmup;
        else if(g_ca) {
-               warmup = time + cvar("g_ca_warmup");
+               warmup = time + autocvar_g_ca_warmup;
                allowed_to_spawn = 1;
        }
        else if(g_freezetag)
        {
-               warmup = time + cvar("g_freezetag_warmup");
+               warmup = time + autocvar_g_freezetag_warmup;
        }
 
        lms_lowest_lives = 999;
@@ -137,7 +137,7 @@ void reset_map(float dorespawn)
        }
 
        if(g_keyhunt)
-               kh_Controller_SetThink(cvar("g_balance_keyhunt_delay_round")+(game_starttime - time), "", kh_StartRound);
+               kh_Controller_SetThink(autocvar_g_balance_keyhunt_delay_round+(game_starttime - time), "", kh_StartRound);
 
        if(g_arena)
        if(champion && champion.classname == "player" && player_count > 1)
@@ -386,7 +386,7 @@ void Spawnqueue_Check()
                return;
 
        if(g_ca) {
-               required_ca_players = max(2, fabs(cvar("bot_vs_human") + 1));
+               required_ca_players = max(2, fabs(autocvar_bot_vs_human + 1));
 
                if(ca_players < required_ca_players && (redspawned && bluespawned)) {
                        reset_map(TRUE);
@@ -404,7 +404,7 @@ void Spawnqueue_Check()
                                        strunzone(champion_name);
                                champion_name = strzone(champion.netname);
                        }
-                       else if((!redspawned && !bluespawned) || time - warmup > cvar("g_ca_round_timelimit")) {
+                       else if((!redspawned && !bluespawned) || time - warmup > autocvar_g_ca_round_timelimit) {
                                FOR_EACH_CLIENT(self) centerprint(self, strcat("^7Round tied.", "^7\n"));
                                next_round = time + 5;
                        }
index 53b6f13..a9c3525 100644 (file)
-float autocvar_sv_cheats;
+float autocvar__campaign_index;
+string autocvar__campaign_name;
+float autocvar__sv_init;
+float autocvar_bot_ai_aimskill_blendrate;
+float autocvar_bot_ai_aimskill_firetolerance_distdegrees;
+float autocvar_bot_ai_aimskill_firetolerance_maxdegrees;
+float autocvar_bot_ai_aimskill_firetolerance_mindegrees;
+float autocvar_bot_ai_aimskill_fixedrate;
+float autocvar_bot_ai_aimskill_mouse;
+float autocvar_bot_ai_aimskill_offset;
+float autocvar_bot_ai_aimskill_order_filter_1st;
+float autocvar_bot_ai_aimskill_order_filter_2nd;
+float autocvar_bot_ai_aimskill_order_filter_3th;
+float autocvar_bot_ai_aimskill_order_filter_4th;
+float autocvar_bot_ai_aimskill_order_filter_5th;
+float autocvar_bot_ai_aimskill_order_mix_1st;
+float autocvar_bot_ai_aimskill_order_mix_2nd;
+float autocvar_bot_ai_aimskill_order_mix_3th;
+float autocvar_bot_ai_aimskill_order_mix_4th;
+float autocvar_bot_ai_aimskill_order_mix_5th;
+float autocvar_bot_ai_aimskill_think;
+float autocvar_bot_ai_bunnyhop_firstjumpdelay;
+float autocvar_bot_ai_bunnyhop_skilloffset;
+float autocvar_bot_ai_bunnyhop_startdistance;
+float autocvar_bot_ai_bunnyhop_stopdistance;
+float autocvar_bot_ai_chooseweaponinterval;
+string autocvar_bot_ai_custom_weapon_priority_close;
+string autocvar_bot_ai_custom_weapon_priority_distances;
+string autocvar_bot_ai_custom_weapon_priority_far;
+string autocvar_bot_ai_custom_weapon_priority_mid;
+float autocvar_bot_ai_dangerdetectioninterval;
+float autocvar_bot_ai_dangerdetectionupdates;
+float autocvar_bot_ai_enemydetectioninterval;
+float autocvar_bot_ai_enemydetectionradius;
+float autocvar_bot_ai_friends_aware_pickup_radius;
+float autocvar_bot_ai_ignoregoal_timeout;
+float autocvar_bot_ai_keyboard_distance;
+float autocvar_bot_ai_keyboard_treshold;
+float autocvar_bot_ai_navigation_jetpack;
+float autocvar_bot_ai_navigation_jetpack_mindistance;
+float autocvar_bot_ai_strategyinterval;
+float autocvar_bot_ai_thinkinterval;
+float autocvar_bot_ai_weapon_combo;
+float autocvar_bot_ai_weapon_combo_threshold;
+string autocvar_bot_config_file;
+float autocvar_bot_god;
+float autocvar_bot_ignore_bots;
+float autocvar_bot_join_empty;
+float autocvar_bot_navigation_ignoreplayers;
+float autocvar_bot_nofire;
+#define autocvar_bot_number cvar("bot_number")
+#define autocvar_bot_prefix cvar_string("bot_prefix")
+float autocvar_bot_sound_monopoly;
+#define autocvar_bot_suffix cvar_string("bot_suffix")
+float autocvar_bot_usemodelnames;
+float autocvar_bot_vs_human;
+float autocvar_captureleadlimit_override;
+#define autocvar_capturelimit_override cvar("capturelimit_override")
+float autocvar_deathmatch_force_teamplay;
+#define autocvar_developer cvar("developer")
+float autocvar_developer_fteqccbugs;
+float autocvar_ekg;
+#define autocvar_fraglimit cvar("fraglimit")
+#define autocvar_fraglimit_override cvar("fraglimit_override")
+float autocvar_g_allow_oldnexbeam;
+float autocvar_g_antilag;
+float autocvar_g_antilag_bullets;
+float autocvar_g_antilag_nudge;
+float autocvar_g_arena_maxspawned;
+float autocvar_g_arena_point_leadlimit;
+float autocvar_g_arena_point_limit;
+float autocvar_g_arena_powerups;
+float autocvar_g_arena_roundbased;
+float autocvar_g_arena_warmup;
+float autocvar_g_assault;
+float autocvar_g_balance_armor_blockpercent;
+float autocvar_g_balance_armor_limit;
+float autocvar_g_balance_armor_regen;
+float autocvar_g_balance_armor_regenlinear;
+float autocvar_g_balance_armor_regenstable;
+float autocvar_g_balance_armor_rot;
+float autocvar_g_balance_armor_rotlinear;
+float autocvar_g_balance_armor_rotstable;
+float autocvar_g_balance_armor_start;
+float autocvar_g_balance_campingrifle_auto_reload_on_switch;
+float autocvar_g_balance_campingrifle_bursttime;
+float autocvar_g_balance_campingrifle_magazinecapacity;
+float autocvar_g_balance_campingrifle_primary_ammo;
+float autocvar_g_balance_campingrifle_primary_animtime;
+float autocvar_g_balance_campingrifle_primary_bulletconstant;
+float autocvar_g_balance_campingrifle_primary_bullethail;
+float autocvar_g_balance_campingrifle_primary_burstcost;
+float autocvar_g_balance_campingrifle_primary_damage;
+float autocvar_g_balance_campingrifle_primary_force;
+float autocvar_g_balance_campingrifle_primary_headshotaddeddamage;
+float autocvar_g_balance_campingrifle_primary_lifetime;
+float autocvar_g_balance_campingrifle_primary_refire;
+float autocvar_g_balance_campingrifle_primary_speed;
+float autocvar_g_balance_campingrifle_primary_spread;
+float autocvar_g_balance_campingrifle_primary_tracer;
+float autocvar_g_balance_campingrifle_reloadtime;
+float autocvar_g_balance_campingrifle_secondary;
+float autocvar_g_balance_campingrifle_secondary_ammo;
+float autocvar_g_balance_campingrifle_secondary_animtime;
+float autocvar_g_balance_campingrifle_secondary_bulletconstant;
+float autocvar_g_balance_campingrifle_secondary_bullethail;
+float autocvar_g_balance_campingrifle_secondary_burstcost;
+float autocvar_g_balance_campingrifle_secondary_damage;
+float autocvar_g_balance_campingrifle_secondary_force;
+float autocvar_g_balance_campingrifle_secondary_headshotaddeddamage;
+float autocvar_g_balance_campingrifle_secondary_lifetime;
+float autocvar_g_balance_campingrifle_secondary_refire;
+float autocvar_g_balance_campingrifle_secondary_speed;
+float autocvar_g_balance_campingrifle_secondary_spread;
+float autocvar_g_balance_campingrifle_secondary_tracer;
+float autocvar_g_balance_cloaked_alpha;
+float autocvar_g_balance_crylink_primary_ammo;
+float autocvar_g_balance_crylink_primary_animtime;
+float autocvar_g_balance_crylink_primary_bouncedamagefactor;
+float autocvar_g_balance_crylink_primary_bounces;
+float autocvar_g_balance_crylink_primary_damage;
+float autocvar_g_balance_crylink_primary_edgedamage;
+float autocvar_g_balance_crylink_primary_force;
+float autocvar_g_balance_crylink_primary_joinexplode;
+float autocvar_g_balance_crylink_primary_joinexplode_damage;
+float autocvar_g_balance_crylink_primary_joinexplode_edgedamage;
+float autocvar_g_balance_crylink_primary_joinexplode_force;
+float autocvar_g_balance_crylink_primary_joinexplode_radius;
+float autocvar_g_balance_crylink_primary_joinspread;
+float autocvar_g_balance_crylink_primary_jointime;
+float autocvar_g_balance_crylink_primary_linkexplode;
+float autocvar_g_balance_crylink_primary_middle_fadetime;
+float autocvar_g_balance_crylink_primary_middle_lifetime;
+float autocvar_g_balance_crylink_primary_other_fadetime;
+float autocvar_g_balance_crylink_primary_other_lifetime;
+float autocvar_g_balance_crylink_primary_radius;
+float autocvar_g_balance_crylink_primary_refire;
+float autocvar_g_balance_crylink_primary_shots;
+float autocvar_g_balance_crylink_primary_speed;
+float autocvar_g_balance_crylink_primary_spread;
+float autocvar_g_balance_crylink_secondary;
+float autocvar_g_balance_crylink_secondary_ammo;
+float autocvar_g_balance_crylink_secondary_animtime;
+float autocvar_g_balance_crylink_secondary_bouncedamagefactor;
+float autocvar_g_balance_crylink_secondary_bounces;
+float autocvar_g_balance_crylink_secondary_damage;
+float autocvar_g_balance_crylink_secondary_edgedamage;
+float autocvar_g_balance_crylink_secondary_force;
+float autocvar_g_balance_crylink_secondary_joinexplode;
+float autocvar_g_balance_crylink_secondary_joinexplode_damage;
+float autocvar_g_balance_crylink_secondary_joinexplode_edgedamage;
+float autocvar_g_balance_crylink_secondary_joinexplode_force;
+float autocvar_g_balance_crylink_secondary_joinexplode_radius;
+float autocvar_g_balance_crylink_secondary_joinspread;
+float autocvar_g_balance_crylink_secondary_jointime;
+float autocvar_g_balance_crylink_secondary_line_fadetime;
+float autocvar_g_balance_crylink_secondary_line_lifetime;
+float autocvar_g_balance_crylink_secondary_linkexplode;
+float autocvar_g_balance_crylink_secondary_middle_fadetime;
+float autocvar_g_balance_crylink_secondary_middle_lifetime;
+float autocvar_g_balance_crylink_secondary_radius;
+float autocvar_g_balance_crylink_secondary_refire;
+float autocvar_g_balance_crylink_secondary_shots;
+float autocvar_g_balance_crylink_secondary_speed;
+float autocvar_g_balance_crylink_secondary_spread;
+float autocvar_g_balance_ctf_damageforcescale;
+float autocvar_g_balance_ctf_delay_collect;
+float autocvar_g_balance_curse_empathy_minhealth;
+float autocvar_g_balance_curse_empathy_takedamage;
+float autocvar_g_balance_curse_slow_atkrate;
+float autocvar_g_balance_curse_slow_highspeed;
+float autocvar_g_balance_curse_venom_hpmod;
+float autocvar_g_balance_curse_venom_limitmod;
+float autocvar_g_balance_curse_venom_rotrate;
+float autocvar_g_balance_curse_vulner_takedamage;
+float autocvar_g_balance_curse_weak_damage;
+float autocvar_g_balance_curse_weak_force;
+float autocvar_g_balance_electro_combo_comboradius;
+float autocvar_g_balance_electro_combo_damage;
+float autocvar_g_balance_electro_combo_edgedamage;
+float autocvar_g_balance_electro_combo_force;
+float autocvar_g_balance_electro_combo_radius;
+float autocvar_g_balance_electro_combo_speed;
+float autocvar_g_balance_electro_lightning;
+float autocvar_g_balance_electro_primary_ammo;
+float autocvar_g_balance_electro_primary_animtime;
+float autocvar_g_balance_electro_primary_comboradius;
+float autocvar_g_balance_electro_primary_damage;
+float autocvar_g_balance_electro_primary_edgedamage;
+float autocvar_g_balance_electro_primary_falloff_halflifedist;
+float autocvar_g_balance_electro_primary_falloff_maxdist;
+float autocvar_g_balance_electro_primary_falloff_mindist;
+float autocvar_g_balance_electro_primary_force;
+float autocvar_g_balance_electro_primary_force_up;
+float autocvar_g_balance_electro_primary_lifetime;
+float autocvar_g_balance_electro_primary_radius;
+float autocvar_g_balance_electro_primary_range;
+float autocvar_g_balance_electro_primary_refire;
+float autocvar_g_balance_electro_primary_speed;
+float autocvar_g_balance_electro_secondary_ammo;
+float autocvar_g_balance_electro_secondary_animtime;
+float autocvar_g_balance_electro_secondary_bouncefactor;
+float autocvar_g_balance_electro_secondary_bouncestop;
+float autocvar_g_balance_electro_secondary_count;
+float autocvar_g_balance_electro_secondary_damage;
+float autocvar_g_balance_electro_secondary_damageforcescale;
+float autocvar_g_balance_electro_secondary_edgedamage;
+float autocvar_g_balance_electro_secondary_force;
+float autocvar_g_balance_electro_secondary_health;
+float autocvar_g_balance_electro_secondary_lifetime;
+float autocvar_g_balance_electro_secondary_radius;
+float autocvar_g_balance_electro_secondary_refire;
+float autocvar_g_balance_electro_secondary_refire2;
+float autocvar_g_balance_electro_secondary_speed;
+float autocvar_g_balance_falldamage_deadminspeed;
+float autocvar_g_balance_falldamage_factor;
+float autocvar_g_balance_falldamage_maxdamage;
+float autocvar_g_balance_falldamage_minspeed;
+float autocvar_g_balance_fireball_primary_ammo;
+float autocvar_g_balance_fireball_primary_animtime;
+float autocvar_g_balance_fireball_primary_bfgdamage;
+float autocvar_g_balance_fireball_primary_bfgforce;
+float autocvar_g_balance_fireball_primary_bfgradius;
+float autocvar_g_balance_fireball_primary_damage;
+float autocvar_g_balance_fireball_primary_damageforcescale;
+float autocvar_g_balance_fireball_primary_edgedamage;
+float autocvar_g_balance_fireball_primary_force;
+float autocvar_g_balance_fireball_primary_health;
+float autocvar_g_balance_fireball_primary_laserburntime;
+float autocvar_g_balance_fireball_primary_laserdamage;
+float autocvar_g_balance_fireball_primary_laseredgedamage;
+float autocvar_g_balance_fireball_primary_laserradius;
+float autocvar_g_balance_fireball_primary_lifetime;
+float autocvar_g_balance_fireball_primary_radius;
+float autocvar_g_balance_fireball_primary_refire;
+float autocvar_g_balance_fireball_primary_refire2;
+float autocvar_g_balance_fireball_primary_speed;
+float autocvar_g_balance_fireball_secondary_ammo;
+float autocvar_g_balance_fireball_secondary_animtime;
+float autocvar_g_balance_fireball_secondary_damage;
+float autocvar_g_balance_fireball_secondary_damageforcescale;
+float autocvar_g_balance_fireball_secondary_damagetime;
+float autocvar_g_balance_fireball_secondary_laserburntime;
+float autocvar_g_balance_fireball_secondary_laserdamage;
+float autocvar_g_balance_fireball_secondary_laseredgedamage;
+float autocvar_g_balance_fireball_secondary_laserradius;
+float autocvar_g_balance_fireball_secondary_lifetime;
+float autocvar_g_balance_fireball_secondary_refire;
+float autocvar_g_balance_fireball_secondary_speed;
+float autocvar_g_balance_fireball_secondary_speed_up;
+float autocvar_g_balance_firetransfer_damage;
+float autocvar_g_balance_firetransfer_time;
+float autocvar_g_balance_fuel_limit;
+float autocvar_g_balance_fuel_regen;
+float autocvar_g_balance_fuel_regenlinear;
+float autocvar_g_balance_fuel_regenstable;
+float autocvar_g_balance_fuel_rot;
+float autocvar_g_balance_fuel_rotlinear;
+float autocvar_g_balance_fuel_rotstable;
+float autocvar_g_balance_grapplehook_airfriction;
+float autocvar_g_balance_grapplehook_force_rubber;
+float autocvar_g_balance_grapplehook_force_rubber_overstretch;
+float autocvar_g_balance_grapplehook_health;
+float autocvar_g_balance_grapplehook_length_min;
+float autocvar_g_balance_grapplehook_speed_fly;
+float autocvar_g_balance_grapplehook_speed_pull;
+float autocvar_g_balance_grapplehook_stretch;
+float autocvar_g_balance_grenadelauncher_bouncefactor;
+float autocvar_g_balance_grenadelauncher_bouncestop;
+float autocvar_g_balance_grenadelauncher_primary_ammo;
+float autocvar_g_balance_grenadelauncher_primary_animtime;
+float autocvar_g_balance_grenadelauncher_primary_damage;
+float autocvar_g_balance_grenadelauncher_primary_damageforcescale;
+float autocvar_g_balance_grenadelauncher_primary_edgedamage;
+float autocvar_g_balance_grenadelauncher_primary_force;
+float autocvar_g_balance_grenadelauncher_primary_health;
+float autocvar_g_balance_grenadelauncher_primary_lifetime;
+float autocvar_g_balance_grenadelauncher_primary_lifetime2;
+float autocvar_g_balance_grenadelauncher_primary_radius;
+float autocvar_g_balance_grenadelauncher_primary_refire;
+float autocvar_g_balance_grenadelauncher_primary_remote_minbouncecnt;
+float autocvar_g_balance_grenadelauncher_primary_speed;
+float autocvar_g_balance_grenadelauncher_primary_speed_up;
+float autocvar_g_balance_grenadelauncher_primary_type;
+float autocvar_g_balance_grenadelauncher_secondary_ammo;
+float autocvar_g_balance_grenadelauncher_secondary_animtime;
+float autocvar_g_balance_grenadelauncher_secondary_damage;
+float autocvar_g_balance_grenadelauncher_secondary_damageforcescale;
+float autocvar_g_balance_grenadelauncher_secondary_edgedamage;
+float autocvar_g_balance_grenadelauncher_secondary_force;
+float autocvar_g_balance_grenadelauncher_secondary_health;
+float autocvar_g_balance_grenadelauncher_secondary_lifetime;
+float autocvar_g_balance_grenadelauncher_secondary_lifetime2;
+float autocvar_g_balance_grenadelauncher_secondary_radius;
+float autocvar_g_balance_grenadelauncher_secondary_refire;
+float autocvar_g_balance_grenadelauncher_secondary_speed;
+float autocvar_g_balance_grenadelauncher_secondary_speed_up;
+float autocvar_g_balance_grenadelauncher_secondary_type;
+float autocvar_g_balance_hagar_primary_ammo;
+float autocvar_g_balance_hagar_primary_damage;
+float autocvar_g_balance_hagar_primary_edgedamage;
+float autocvar_g_balance_hagar_primary_force;
+float autocvar_g_balance_hagar_primary_lifetime;
+float autocvar_g_balance_hagar_primary_radius;
+float autocvar_g_balance_hagar_primary_refire;
+float autocvar_g_balance_hagar_primary_speed;
+float autocvar_g_balance_hagar_secondary;
+float autocvar_g_balance_hagar_secondary_ammo;
+float autocvar_g_balance_hagar_secondary_damage;
+float autocvar_g_balance_hagar_secondary_edgedamage;
+float autocvar_g_balance_hagar_secondary_force;
+float autocvar_g_balance_hagar_secondary_lifetime_min;
+float autocvar_g_balance_hagar_secondary_lifetime_rand;
+float autocvar_g_balance_hagar_secondary_radius;
+float autocvar_g_balance_hagar_secondary_refire;
+float autocvar_g_balance_health_limit;
+float autocvar_g_balance_health_regen;
+float autocvar_g_balance_health_regenlinear;
+float autocvar_g_balance_health_regenstable;
+float autocvar_g_balance_health_rot;
+float autocvar_g_balance_health_rotlinear;
+float autocvar_g_balance_health_rotstable;
+float autocvar_g_balance_health_start;
+float autocvar_g_balance_hlac_primary_ammo;
+float autocvar_g_balance_hlac_primary_animtime;
+float autocvar_g_balance_hlac_primary_damage;
+float autocvar_g_balance_hlac_primary_edgedamage;
+float autocvar_g_balance_hlac_primary_force;
+float autocvar_g_balance_hlac_primary_lifetime;
+float autocvar_g_balance_hlac_primary_radius;
+float autocvar_g_balance_hlac_primary_refire;
+float autocvar_g_balance_hlac_primary_speed;
+float autocvar_g_balance_hlac_primary_spread_add;
+float autocvar_g_balance_hlac_primary_spread_crouchmod;
+float autocvar_g_balance_hlac_primary_spread_max;
+float autocvar_g_balance_hlac_primary_spread_min;
+float autocvar_g_balance_hlac_secondary;
+float autocvar_g_balance_hlac_secondary_ammo;
+float autocvar_g_balance_hlac_secondary_animtime;
+float autocvar_g_balance_hlac_secondary_damage;
+float autocvar_g_balance_hlac_secondary_edgedamage;
+float autocvar_g_balance_hlac_secondary_force;
+float autocvar_g_balance_hlac_secondary_lifetime;
+float autocvar_g_balance_hlac_secondary_radius;
+float autocvar_g_balance_hlac_secondary_refire;
+float autocvar_g_balance_hlac_secondary_shots;
+float autocvar_g_balance_hlac_secondary_speed;
+float autocvar_g_balance_hlac_secondary_spread;
+float autocvar_g_balance_hlac_secondary_spread_crouchmod;
+float autocvar_g_balance_hook_primary_animtime;
+float autocvar_g_balance_hook_primary_fuel;
+float autocvar_g_balance_hook_primary_hooked_fuel;
+float autocvar_g_balance_hook_primary_hooked_time_free;
+float autocvar_g_balance_hook_primary_hooked_time_max;
+float autocvar_g_balance_hook_primary_refire;
+float autocvar_g_balance_hook_secondary_ammo;
+float autocvar_g_balance_hook_secondary_animtime;
+float autocvar_g_balance_hook_secondary_damage;
+float autocvar_g_balance_hook_secondary_duration;
+float autocvar_g_balance_hook_secondary_edgedamage;
+float autocvar_g_balance_hook_secondary_force;
+float autocvar_g_balance_hook_secondary_gravity;
+float autocvar_g_balance_hook_secondary_lifetime;
+float autocvar_g_balance_hook_secondary_power;
+float autocvar_g_balance_hook_secondary_radius;
+float autocvar_g_balance_hook_secondary_refire;
+float autocvar_g_balance_hook_secondary_speed;
+float autocvar_g_balance_keyhunt_damageforcescale;
+float autocvar_g_balance_keyhunt_delay_collect;
+float autocvar_g_balance_keyhunt_delay_drop;
+float autocvar_g_balance_keyhunt_delay_return;
+float autocvar_g_balance_keyhunt_delay_round;
+float autocvar_g_balance_keyhunt_delay_tracking;
+float autocvar_g_balance_keyhunt_dropvelocity;
+float autocvar_g_balance_keyhunt_maxdist;
+float autocvar_g_balance_keyhunt_protecttime;
+float autocvar_g_balance_keyhunt_score_capture;
+float autocvar_g_balance_keyhunt_score_carrierfrag;
+float autocvar_g_balance_keyhunt_score_collect;
+float autocvar_g_balance_keyhunt_score_destroyed;
+float autocvar_g_balance_keyhunt_score_destroyed_ownfactor;
+float autocvar_g_balance_keyhunt_score_push;
+float autocvar_g_balance_keyhunt_throwvelocity;
+float autocvar_g_balance_kill_delay;
+float autocvar_g_balance_laser_primary_animtime;
+float autocvar_g_balance_laser_primary_damage;
+float autocvar_g_balance_laser_primary_delay;
+float autocvar_g_balance_laser_primary_edgedamage;
+float autocvar_g_balance_laser_primary_force;
+float autocvar_g_balance_laser_primary_force_velocitybias;
+float autocvar_g_balance_laser_primary_force_zscale;
+float autocvar_g_balance_laser_primary_lifetime;
+float autocvar_g_balance_laser_primary_radius;
+float autocvar_g_balance_laser_primary_refire;
+float autocvar_g_balance_laser_primary_shotangle;
+float autocvar_g_balance_laser_primary_speed;
+float autocvar_g_balance_laser_secondary;
+float autocvar_g_balance_laser_secondary_animtime;
+float autocvar_g_balance_laser_secondary_damage;
+float autocvar_g_balance_laser_secondary_edgedamage;
+float autocvar_g_balance_laser_secondary_force;
+float autocvar_g_balance_laser_secondary_force_velocitybias;
+float autocvar_g_balance_laser_secondary_force_zscale;
+float autocvar_g_balance_laser_secondary_lifetime;
+float autocvar_g_balance_laser_secondary_radius;
+float autocvar_g_balance_laser_secondary_speed;
+float autocvar_g_balance_minelayer_ammo;
+float autocvar_g_balance_minelayer_animtime;
+float autocvar_g_balance_minelayer_damage;
+float autocvar_g_balance_minelayer_damageforcescale;
+float autocvar_g_balance_minelayer_detonatedelay;
+float autocvar_g_balance_minelayer_edgedamage;
+float autocvar_g_balance_minelayer_force;
+float autocvar_g_balance_minelayer_health;
+float autocvar_g_balance_minelayer_lifetime;
+float autocvar_g_balance_minelayer_limit;
+float autocvar_g_balance_minelayer_protection;
+float autocvar_g_balance_minelayer_proximityradius;
+float autocvar_g_balance_minelayer_radius;
+float autocvar_g_balance_minelayer_refire;
+float autocvar_g_balance_minelayer_remote_damage;
+float autocvar_g_balance_minelayer_remote_edgedamage;
+float autocvar_g_balance_minelayer_remote_force;
+float autocvar_g_balance_minelayer_remote_radius;
+float autocvar_g_balance_minelayer_speed;
+float autocvar_g_balance_minelayer_time;
+float autocvar_g_balance_minstanex_ammo;
+float autocvar_g_balance_minstanex_animtime;
+float autocvar_g_balance_minstanex_refire;
+float autocvar_g_balance_nex_charge;
+float autocvar_g_balance_nex_charge_limit;
+float autocvar_g_balance_nex_charge_maxspeed;
+float autocvar_g_balance_nex_charge_mindmg;
+float autocvar_g_balance_nex_charge_minspeed;
+float autocvar_g_balance_nex_charge_rate;
+float autocvar_g_balance_nex_charge_rot_pause;
+float autocvar_g_balance_nex_charge_rot_rate;
+float autocvar_g_balance_nex_charge_shot_multiplier;
+float autocvar_g_balance_nex_charge_start;
+float autocvar_g_balance_nex_charge_velocity_rate;
+float autocvar_g_balance_nex_primary_ammo;
+float autocvar_g_balance_nex_primary_animtime;
+float autocvar_g_balance_nex_primary_damage;
+float autocvar_g_balance_nex_primary_damagefalloff_forcehalflife;
+float autocvar_g_balance_nex_primary_damagefalloff_halflife;
+float autocvar_g_balance_nex_primary_damagefalloff_maxdist;
+float autocvar_g_balance_nex_primary_damagefalloff_mindist;
+float autocvar_g_balance_nex_primary_force;
+float autocvar_g_balance_nex_primary_refire;
+float autocvar_g_balance_nex_secondary;
+float autocvar_g_balance_nex_secondary_ammo;
+float autocvar_g_balance_nex_secondary_animtime;
+float autocvar_g_balance_nex_secondary_charge;
+float autocvar_g_balance_nex_secondary_charge_rate;
+float autocvar_g_balance_nex_secondary_chargepool;
+float autocvar_g_balance_nex_secondary_chargepool_pause_health_regen;
+float autocvar_g_balance_nex_secondary_chargepool_pause_regen;
+float autocvar_g_balance_nex_secondary_chargepool_regen;
+float autocvar_g_balance_nex_secondary_damage;
+float autocvar_g_balance_nex_secondary_damagefalloff_forcehalflife;
+float autocvar_g_balance_nex_secondary_damagefalloff_halflife;
+float autocvar_g_balance_nex_secondary_damagefalloff_maxdist;
+float autocvar_g_balance_nex_secondary_damagefalloff_mindist;
+float autocvar_g_balance_nex_secondary_force;
+float autocvar_g_balance_nex_secondary_refire;
+float autocvar_g_balance_nexball_primary_animtime;
+float autocvar_g_balance_nexball_primary_refire;
+float autocvar_g_balance_nexball_primary_speed;
+float autocvar_g_balance_nexball_secondary_animtime;
+float autocvar_g_balance_nexball_secondary_force;
+float autocvar_g_balance_nexball_secondary_lifetime;
+float autocvar_g_balance_nexball_secondary_refire;
+float autocvar_g_balance_nexball_secondary_speed;
+float autocvar_g_balance_nix_ammo_cells;
+float autocvar_g_balance_nix_ammo_fuel;
+float autocvar_g_balance_nix_ammo_nails;
+float autocvar_g_balance_nix_ammo_rockets;
+float autocvar_g_balance_nix_ammo_shells;
+float autocvar_g_balance_nix_ammoincr_cells;
+float autocvar_g_balance_nix_ammoincr_fuel;
+float autocvar_g_balance_nix_ammoincr_nails;
+float autocvar_g_balance_nix_ammoincr_rockets;
+float autocvar_g_balance_nix_ammoincr_shells;
+float autocvar_g_balance_nix_incrtime;
+float autocvar_g_balance_nix_roundtime;
+float autocvar_g_balance_pause_armor_rot;
+float autocvar_g_balance_pause_armor_rot_spawn;
+float autocvar_g_balance_pause_fuel_regen;
+float autocvar_g_balance_pause_fuel_rot;
+float autocvar_g_balance_pause_fuel_rot_spawn;
+float autocvar_g_balance_pause_health_regen;
+float autocvar_g_balance_pause_health_regen_spawn;
+float autocvar_g_balance_pause_health_rot;
+float autocvar_g_balance_pause_health_rot_spawn;
+float autocvar_g_balance_portal_health;
+float autocvar_g_balance_portal_lifetime;
+float autocvar_g_balance_porto_primary_animtime;
+float autocvar_g_balance_porto_primary_lifetime;
+float autocvar_g_balance_porto_primary_refire;
+float autocvar_g_balance_porto_primary_speed;
+float autocvar_g_balance_powerup_invincible_takedamage;
+float autocvar_g_balance_powerup_invincible_time;
+float autocvar_g_balance_powerup_strength_damage;
+float autocvar_g_balance_powerup_strength_force;
+float autocvar_g_balance_powerup_strength_selfdamage;
+float autocvar_g_balance_powerup_strength_selfforce;
+float autocvar_g_balance_powerup_strength_time;
+float autocvar_g_balance_powerup_timer;
+float autocvar_g_balance_rocketlauncher_ammo;
+float autocvar_g_balance_rocketlauncher_animtime;
+float autocvar_g_balance_rocketlauncher_damage;
+float autocvar_g_balance_rocketlauncher_damageforcescale;
+float autocvar_g_balance_rocketlauncher_detonatedelay;
+float autocvar_g_balance_rocketlauncher_edgedamage;
+float autocvar_g_balance_rocketlauncher_force;
+float autocvar_g_balance_rocketlauncher_guidedelay;
+float autocvar_g_balance_rocketlauncher_guidegoal;
+float autocvar_g_balance_rocketlauncher_guiderate;
+float autocvar_g_balance_rocketlauncher_guideratedelay;
+float autocvar_g_balance_rocketlauncher_guidestop;
+float autocvar_g_balance_rocketlauncher_health;
+float autocvar_g_balance_rocketlauncher_lifetime;
+float autocvar_g_balance_rocketlauncher_radius;
+float autocvar_g_balance_rocketlauncher_refire;
+float autocvar_g_balance_rocketlauncher_remote_damage;
+float autocvar_g_balance_rocketlauncher_remote_edgedamage;
+float autocvar_g_balance_rocketlauncher_remote_force;
+float autocvar_g_balance_rocketlauncher_remote_radius;
+float autocvar_g_balance_rocketlauncher_speed;
+float autocvar_g_balance_rocketlauncher_speedaccel;
+float autocvar_g_balance_rocketlauncher_speedstart;
+float autocvar_g_balance_rune_defense_combo_takedamage;
+float autocvar_g_balance_rune_defense_takedamage;
+float autocvar_g_balance_rune_regen_combo_hpmod;
+float autocvar_g_balance_rune_regen_combo_limitmod;
+float autocvar_g_balance_rune_regen_combo_regenrate;
+float autocvar_g_balance_rune_regen_combo_rotrate;
+float autocvar_g_balance_rune_regen_hpmod;
+float autocvar_g_balance_rune_regen_limitmod;
+float autocvar_g_balance_rune_regen_regenrate;
+float autocvar_g_balance_rune_speed_atkrate;
+float autocvar_g_balance_rune_speed_combo_atkrate;
+float autocvar_g_balance_rune_speed_combo_highspeed;
+float autocvar_g_balance_rune_speed_highspeed;
+float autocvar_g_balance_rune_strength_combo_damage;
+float autocvar_g_balance_rune_strength_combo_force;
+float autocvar_g_balance_rune_strength_damage;
+float autocvar_g_balance_rune_strength_force;
+float autocvar_g_balance_rune_vampire_absorb;
+float autocvar_g_balance_rune_vampire_combo_absorb;
+float autocvar_g_balance_rune_vampire_maxhealth;
+float autocvar_g_balance_seeker_flac_ammo;
+float autocvar_g_balance_seeker_flac_animtime;
+float autocvar_g_balance_seeker_flac_damage;
+float autocvar_g_balance_seeker_flac_edgedamage;
+float autocvar_g_balance_seeker_flac_force;
+float autocvar_g_balance_seeker_flac_lifetime;
+float autocvar_g_balance_seeker_flac_lifetime_rand;
+float autocvar_g_balance_seeker_flac_radius;
+float autocvar_g_balance_seeker_flac_refire;
+float autocvar_g_balance_seeker_missile_accel;
+float autocvar_g_balance_seeker_missile_ammo;
+float autocvar_g_balance_seeker_missile_count;
+float autocvar_g_balance_seeker_missile_damage;
+float autocvar_g_balance_seeker_missile_damageforcescale;
+float autocvar_g_balance_seeker_missile_decel;
+float autocvar_g_balance_seeker_missile_delay;
+float autocvar_g_balance_seeker_missile_edgedamage;
+float autocvar_g_balance_seeker_missile_force;
+float autocvar_g_balance_seeker_missile_health;
+float autocvar_g_balance_seeker_missile_lifetime;
+float autocvar_g_balance_seeker_missile_proxy;
+float autocvar_g_balance_seeker_missile_proxy_delay;
+float autocvar_g_balance_seeker_missile_proxy_maxrange;
+float autocvar_g_balance_seeker_missile_radius;
+float autocvar_g_balance_seeker_missile_smart;
+float autocvar_g_balance_seeker_missile_smart_mindist;
+float autocvar_g_balance_seeker_missile_smart_trace_max;
+float autocvar_g_balance_seeker_missile_smart_trace_min;
+float autocvar_g_balance_seeker_missile_speed_max;
+float autocvar_g_balance_seeker_missile_turnrate;
+float autocvar_g_balance_seeker_tag_ammo;
+float autocvar_g_balance_seeker_tag_animtime;
+float autocvar_g_balance_seeker_tag_damageforcescale;
+float autocvar_g_balance_seeker_tag_health;
+float autocvar_g_balance_seeker_tag_lifetime;
+float autocvar_g_balance_seeker_tag_refire;
+float autocvar_g_balance_seeker_tag_speed;
+float autocvar_g_balance_selfdamagepercent;
+float autocvar_g_balance_shotgun_primary_ammo;
+float autocvar_g_balance_shotgun_primary_animtime;
+float autocvar_g_balance_shotgun_primary_bulletconstant;
+float autocvar_g_balance_shotgun_primary_bullets;
+float autocvar_g_balance_shotgun_primary_damage;
+float autocvar_g_balance_shotgun_primary_force;
+float autocvar_g_balance_shotgun_primary_refire;
+float autocvar_g_balance_shotgun_primary_speed;
+float autocvar_g_balance_shotgun_primary_spread;
+float autocvar_g_balance_shotgun_secondary;
+float autocvar_g_balance_shotgun_secondary_animtime;
+float autocvar_g_balance_shotgun_secondary_damage;
+float autocvar_g_balance_shotgun_secondary_force;
+float autocvar_g_balance_shotgun_secondary_melee_delay;
+float autocvar_g_balance_shotgun_secondary_melee_range;
+float autocvar_g_balance_shotgun_secondary_melee_swing;
+float autocvar_g_balance_shotgun_secondary_melee_time;
+float autocvar_g_balance_shotgun_secondary_refire;
+float autocvar_g_balance_teams;
+float autocvar_g_balance_teams_force;
+float autocvar_g_balance_teams_prevent_imbalance;
+float autocvar_g_balance_tuba_animtime;
+float autocvar_g_balance_tuba_attenuation;
+float autocvar_g_balance_tuba_damage;
+float autocvar_g_balance_tuba_edgedamage;
+float autocvar_g_balance_tuba_force;
+float autocvar_g_balance_tuba_radius;
+float autocvar_g_balance_tuba_refire;
+float autocvar_g_balance_uzi_bulletconstant;
+float autocvar_g_balance_uzi_burst;
+float autocvar_g_balance_uzi_burst_ammo;
+float autocvar_g_balance_uzi_burst_refire;
+float autocvar_g_balance_uzi_burst_refire2;
+float autocvar_g_balance_uzi_burst_spread;
+float autocvar_g_balance_uzi_first;
+float autocvar_g_balance_uzi_first_ammo;
+float autocvar_g_balance_uzi_first_damage;
+float autocvar_g_balance_uzi_first_force;
+float autocvar_g_balance_uzi_first_refire;
+float autocvar_g_balance_uzi_first_spread;
+float autocvar_g_balance_uzi_mode;
+float autocvar_g_balance_uzi_speed;
+float autocvar_g_balance_uzi_spread_add;
+float autocvar_g_balance_uzi_spread_max;
+float autocvar_g_balance_uzi_spread_min;
+float autocvar_g_balance_uzi_sustained_ammo;
+float autocvar_g_balance_uzi_sustained_damage;
+float autocvar_g_balance_uzi_sustained_force;
+float autocvar_g_balance_uzi_sustained_refire;
+float autocvar_g_balance_uzi_sustained_spread;
+float autocvar_g_balance_weaponswitchdelay;
+float autocvar_g_ballistics_density_corpse;
+float autocvar_g_ballistics_density_player;
+float autocvar_g_ballistics_materialconstant;
+float autocvar_g_ballistics_mindistance;
+float autocvar_g_ban_default_bantime;
+float autocvar_g_ban_default_masksize;
+float autocvar_g_ban_sync_interval;
+float autocvar_g_ban_sync_timeout;
+string autocvar_g_ban_sync_trusted_servers;
+float autocvar_g_ban_sync_trusted_servers_verify;
+string autocvar_g_ban_sync_uri;
+string autocvar_g_banned_list;
+float autocvar_g_banned_list_idmode;
 float autocvar_g_bastet;
-float autocvar_teamplay_mode;
+float autocvar_g_botclip_collisions;
+float autocvar_g_bugrigs;
+float autocvar_g_ca_damage2score_multiplier;
+float autocvar_g_ca_point_leadlimit;
+float autocvar_g_ca_point_limit;
+float autocvar_g_ca_round_timelimit;
+float autocvar_g_ca_warmup;
+float autocvar_g_campaign;
+float autocvar_g_campaign_forceteam;
+float autocvar_g_campaign_skill;
+float autocvar_g_casings;
+float autocvar_g_changeteam_banned;
+float autocvar_g_chat_flood_burst;
+float autocvar_g_chat_flood_burst_team;
+float autocvar_g_chat_flood_burst_tell;
+float autocvar_g_chat_flood_lmax;
+float autocvar_g_chat_flood_lmax_team;
+float autocvar_g_chat_flood_lmax_tell;
+float autocvar_g_chat_flood_notify_flooder;
+float autocvar_g_chat_flood_spl;
+float autocvar_g_chat_flood_spl_team;
+float autocvar_g_chat_flood_spl_tell;
+float autocvar_g_chat_nospectators;
+float autocvar_g_chat_teamcolors;
+float autocvar_g_ctf_allow_drop;
+float autocvar_g_ctf_captimerecord_always;
+float autocvar_g_ctf_capture_leadlimit;
+float autocvar_g_ctf_capture_limit;
+float autocvar_g_ctf_dynamiclights;
+string autocvar_g_ctf_flag_blue_model;
+float autocvar_g_ctf_flag_blue_skin;
+float autocvar_g_ctf_flag_capture_effects;
+float autocvar_g_ctf_flag_glowtrails;
+float autocvar_g_ctf_flag_pickup_effects;
+string autocvar_g_ctf_flag_red_model;
+float autocvar_g_ctf_flag_red_skin;
+float autocvar_g_ctf_flag_returntime;
+float autocvar_g_ctf_flagcarrier_selfdamage;
+float autocvar_g_ctf_flagcarrier_selfforce;
+float autocvar_g_ctf_fullbrightflags;
+float autocvar_g_ctf_ignore_frags;
+float autocvar_g_ctf_shield_force;
+float autocvar_g_ctf_shield_max_ratio;
+float autocvar_g_ctf_shield_min_negscore;
+float autocvar_g_ctf_win_mode;
+float autocvar_g_cts_finish_kill_delay;
+float autocvar_g_cts_selfdamage;
+float autocvar_g_deathglow;
+float autocvar_g_debug_bot_commands;
+float autocvar_g_domination_default_teams;
+float autocvar_g_domination_disable_frags;
+float autocvar_g_domination_point_amt;
+float autocvar_g_domination_point_fullbright;
+float autocvar_g_domination_point_leadlimit;
+#define autocvar_g_domination_point_limit cvar("g_domination_point_limit")
+float autocvar_g_domination_point_rate;
+float autocvar_g_domination_teams_override;
+float autocvar_g_forced_respawn;
+string autocvar_g_forced_team_blue;
+string autocvar_g_forced_team_otherwise;
+string autocvar_g_forced_team_pink;
+string autocvar_g_forced_team_red;
+string autocvar_g_forced_team_yellow;
+float autocvar_g_freezetag_frozen_force;
+float autocvar_g_freezetag_point_leadlimit;
+float autocvar_g_freezetag_point_limit;
+float autocvar_g_freezetag_revive_extra_size;
+float autocvar_g_freezetag_revive_time;
+float autocvar_g_freezetag_warmup;
+#define autocvar_g_friendlyfire cvar("g_friendlyfire")
+float autocvar_g_full_getstatus_responses;
+float autocvar_g_fullbrightitems;
+float autocvar_g_fullbrightplayers;
+string autocvar_g_ghost_items_color;
+#define autocvar_g_grappling_hook cvar("g_grappling_hook")
+float autocvar_g_grappling_hook_tarzan;
+float autocvar_g_hitplots;
+string autocvar_g_hitplots_individuals;
+float autocvar_g_jetpack_acceleration_side;
+float autocvar_g_jetpack_acceleration_up;
+float autocvar_g_jetpack_antigravity;
+float autocvar_g_jetpack_attenuation;
+float autocvar_g_jetpack_fuel;
+float autocvar_g_jetpack_maxspeed_side;
+float autocvar_g_jetpack_maxspeed_up;
+float autocvar_g_keepaway_ballcarrier_alpha;
+float autocvar_g_keepaway_ballcarrier_damage;
+float autocvar_g_keepaway_ballcarrier_force;
+float autocvar_g_keepaway_ballcarrier_highspeed;
+float autocvar_g_keepaway_ballcarrier_selfdamage;
+float autocvar_g_keepaway_ballcarrier_selfforce;
+float autocvar_g_keepaway_bckillscore;
+float autocvar_g_keepaway_noncarrier_damage;
+float autocvar_g_keepaway_noncarrier_force;
+float autocvar_g_keepaway_noncarrier_selfdamage;
+float autocvar_g_keepaway_noncarrier_selfforce;
+float autocvar_g_keepaway_noncarrier_warn;
+float autocvar_g_keepawayball_damageforcescale;
+float autocvar_g_keepawayball_respawntime;
+float autocvar_g_keepawayball_trail_color;
+float autocvar_g_keyhunt_point_leadlimit;
+#define autocvar_g_keyhunt_point_limit cvar("g_keyhunt_point_limit")
+float autocvar_g_keyhunt_teams;
+float autocvar_g_keyhunt_teams_override;
+float autocvar_g_lms_campcheck_damage;
+float autocvar_g_lms_campcheck_distance;
+float autocvar_g_lms_campcheck_interval;
+string autocvar_g_lms_campcheck_message;
+float autocvar_g_lms_join_anytime;
+float autocvar_g_lms_last_join;
+#define autocvar_g_lms_lives_override cvar("g_lms_lives_override")
+float autocvar_g_lms_regenerate;
+#define autocvar_g_maplist cvar_string("g_maplist")
+float autocvar_g_maplist_check_waypoints;
+float autocvar_g_maplist_index;
+string autocvar_g_maplist_mostrecent;
+float autocvar_g_maplist_mostrecent_count;
+float autocvar_g_maplist_selectrandom;
+float autocvar_g_maplist_shuffle;
+#define autocvar_g_maplist_votable cvar("g_maplist_votable")
+float autocvar_g_maplist_votable_abstain;
+float autocvar_g_maplist_votable_keeptwotime;
+float autocvar_g_maplist_votable_nodetail;
+string autocvar_g_maplist_votable_screenshot_dir;
+float autocvar_g_maplist_votable_suggestions;
+float autocvar_g_maplist_votable_suggestions_override_mostrecent;
+float autocvar_g_maplist_votable_timeout;
+float autocvar_g_maxplayers;
+float autocvar_g_maxplayers_spectator_blocktime;
+float autocvar_g_maxpushtime;
+float autocvar_g_maxspeed;
+#define autocvar_g_midair cvar("g_midair")
+float autocvar_g_midair_shieldtime;
+#define autocvar_g_minstagib cvar("g_minstagib")
+float autocvar_g_minstagib_ammo_drop;
+float autocvar_g_minstagib_extralives;
+float autocvar_g_minstagib_speed_highspeed;
+#define autocvar_g_mirrordamage cvar("g_mirrordamage")
+float autocvar_g_monster_zombie_attack_run_damage;
+float autocvar_g_monster_zombie_attack_run_delay;
+float autocvar_g_monster_zombie_attack_run_force;
+float autocvar_g_monster_zombie_attack_run_hitrange;
+float autocvar_g_monster_zombie_attack_run_range;
+float autocvar_g_monster_zombie_attack_stand_damage;
+float autocvar_g_monster_zombie_attack_stand_delay;
+float autocvar_g_monster_zombie_attack_stand_force;
+float autocvar_g_monster_zombie_attack_stand_range;
+float autocvar_g_monster_zombie_health;
+float autocvar_g_monster_zombie_idle_timer_max;
+float autocvar_g_monster_zombie_idle_timer_min;
+float autocvar_g_monster_zombie_movespeed;
+float autocvar_g_monster_zombie_respawntime;
+float autocvar_g_monster_zombie_stopspeed;
+float autocvar_g_monster_zombie_targetrange;
+float autocvar_g_monster_zombie_turnspeed;
+float autocvar_g_monsters;
 var float autocvar_g_movement_highspeed = 1;
-var float autocvar_sv_accuracy_data_share = 1;
-
+float autocvar_g_multijump;
+float autocvar_g_multijump_add;
+float autocvar_g_multijump_speed;
+string autocvar_g_mutatormsg;
+float autocvar_g_nexball_basketball_bouncefactor;
+float autocvar_g_nexball_basketball_bouncestop;
+float autocvar_g_nexball_basketball_carrier_highspeed;
+float autocvar_g_nexball_basketball_meter;
+float autocvar_g_nexball_basketball_meter_maxpower;
+float autocvar_g_nexball_basketball_meter_minpower;
+float autocvar_g_nexball_delay_collect;
+float autocvar_g_nexball_delay_goal;
+float autocvar_g_nexball_delay_start;
+float autocvar_g_nexball_football_bouncefactor;
+float autocvar_g_nexball_football_bouncestop;
+float autocvar_g_nexball_goalleadlimit;
+#define autocvar_g_nexball_goallimit cvar("g_nexball_goallimit")
+float autocvar_g_nexball_radar_showallplayers;
+float autocvar_g_nexball_sound_bounce;
+float autocvar_g_nexball_trail_color;
+float autocvar_g_nick_flood_penalty;
+float autocvar_g_nick_flood_penalty_red;
+float autocvar_g_nick_flood_penalty_yellow;
+float autocvar_g_nick_flood_timeout;
+float autocvar_g_nix_with_healtharmor;
+float autocvar_g_nix_with_laser;
+float autocvar_g_nix_with_powerups;
+float autocvar_g_nodepthtestitems;
+float autocvar_g_nodepthtestplayers;
+float autocvar_g_norecoil;
+float autocvar_g_onslaught_cp_buildhealth;
+float autocvar_g_onslaught_cp_buildtime;
+float autocvar_g_onslaught_cp_health;
+float autocvar_g_onslaught_cp_regen;
+float autocvar_g_onslaught_gen_health;
+float autocvar_g_pickup_cells_max;
+float autocvar_g_pickup_fuel_max;
+float autocvar_g_pickup_items;
+float autocvar_g_pickup_nails_max;
+float autocvar_g_pickup_rockets_max;
+float autocvar_g_pickup_shells_max;
+float autocvar_g_player_alpha;
+float autocvar_g_player_brightness;
+float autocvar_g_playerclip_collisions;
+string autocvar_g_playerstats_uri;
+float autocvar_g_powerup_shield;
+float autocvar_g_powerup_strength;
+float autocvar_g_powerup_superhealth;
+float autocvar_g_projectiles_newton_style;
+float autocvar_g_projectiles_newton_style_2_maxfactor;
+float autocvar_g_projectiles_newton_style_2_minfactor;
+float autocvar_g_projectiles_spread_style;
+#define autocvar_g_race_laps_limit cvar("g_race_laps_limit")
+float autocvar_g_race_qualifying_timelimit;
+float autocvar_g_race_qualifying_timelimit_override;
+float autocvar_g_race_teams;
+float autocvar_g_respawn_delay;
+float autocvar_g_respawn_ghosts;
+float autocvar_g_respawn_ghosts_maxtime;
+float autocvar_g_respawn_ghosts_speed;
+float autocvar_g_respawn_waves;
+float autocvar_g_runematch_allow_same;
+float autocvar_g_runematch_drop_runes_max;
+float autocvar_g_runematch_fixedspawns;
+float autocvar_g_runematch_frags_killed_runeholder;
+float autocvar_g_runematch_frags_killedby_runeholder;
+float autocvar_g_runematch_frags_norune;
+float autocvar_g_runematch_point_leadlimit;
+#define autocvar_g_runematch_point_limit cvar("g_runematch_point_limit")
+float autocvar_g_runematch_pointamt;
+float autocvar_g_runematch_pointrate;
+float autocvar_g_runematch_respawntime;
+float autocvar_g_runematch_rune_alpha;
+float autocvar_g_runematch_rune_color_strength;
+float autocvar_g_runematch_rune_effects;
+float autocvar_g_runematch_shuffletime;
+float autocvar_g_running_guns;
+float autocvar_g_shootfromcenter;
+float autocvar_g_shootfromclient;
+float autocvar_g_shootfromeye;
+string autocvar_g_shootfromfixedorigin;
+float autocvar_g_showweaponspawns;
+float autocvar_g_spawn_furthest;
+float autocvar_g_spawnpoints_auto_move_out_of_solid;
+#define autocvar_g_spawnshieldtime cvar("g_spawnshieldtime")
+float autocvar_g_spawnsound;
+float autocvar_g_start_delay;
+#define autocvar_g_start_weapon_laser cvar("g_start_weapon_laser")
+float autocvar_g_tdm_team_spawns;
+float autocvar_g_tdm_teams;
+float autocvar_g_tdm_teams_override;
+float autocvar_g_teamdamage_resetspeed;
+float autocvar_g_teamdamage_threshold;
+float autocvar_g_telefrags;
+float autocvar_g_telefrags_avoid;
+float autocvar_g_telefrags_teamplay;
+float autocvar_g_teleport_maxspeed;
+float autocvar_g_throughfloor_damage;
+float autocvar_g_throughfloor_force;
+float autocvar_g_triggerimpulse_accel_multiplier;
+float autocvar_g_triggerimpulse_accel_power;
+float autocvar_g_triggerimpulse_directional_multiplier;
+float autocvar_g_triggerimpulse_radial_multiplier;
+float autocvar_g_turrets;
+float autocvar_g_turrets_aimidle_delay;
+float autocvar_g_turrets_nofire;
+float autocvar_g_turrets_reloadcvars;
+float autocvar_g_turrets_targetscan_maxdelay;
+float autocvar_g_turrets_targetscan_mindelay;
+float autocvar_g_turrets_unit_ewheel_speed_fast;
+float autocvar_g_turrets_unit_ewheel_speed_slow;
+float autocvar_g_turrets_unit_ewheel_speed_slower;
+float autocvar_g_turrets_unit_ewheel_speed_stop;
+float autocvar_g_turrets_unit_ewheel_turnrate;
+float autocvar_g_turrets_unit_hellion_std_shot_speed_gain;
+float autocvar_g_turrets_unit_hellion_std_shot_speed_max;
+float autocvar_g_turrets_unit_hk_std_shot_speed;
+float autocvar_g_turrets_unit_hk_std_shot_speed_accel;
+float autocvar_g_turrets_unit_hk_std_shot_speed_accel2;
+float autocvar_g_turrets_unit_hk_std_shot_speed_decel;
+float autocvar_g_turrets_unit_hk_std_shot_speed_max;
+float autocvar_g_turrets_unit_hk_std_shot_speed_turnrate;
+float autocvar_g_turrets_unit_walker_speed_jump;
+float autocvar_g_turrets_unit_walker_speed_roam;
+float autocvar_g_turrets_unit_walker_speed_run;
+float autocvar_g_turrets_unit_walker_speed_stop;
+float autocvar_g_turrets_unit_walker_speed_swim;
+float autocvar_g_turrets_unit_walker_speed_walk;
+float autocvar_g_turrets_unit_walker_std_meele_dmg;
+float autocvar_g_turrets_unit_walker_std_meele_force;
+float autocvar_g_turrets_unit_walker_std_meele_range;
+float autocvar_g_turrets_unit_walker_std_rocket_dmg;
+float autocvar_g_turrets_unit_walker_std_rocket_force;
+float autocvar_g_turrets_unit_walker_std_rocket_radius;
+float autocvar_g_turrets_unit_walker_std_rocket_refire;
+float autocvar_g_turrets_unit_walker_std_rocket_speed;
+float autocvar_g_turrets_unit_walker_std_rocket_turnrate;
+float autocvar_g_turrets_unit_walker_std_rockets_range;
+float autocvar_g_turrets_unit_walker_std_rockets_range_min;
+float autocvar_g_use_ammunition;
+float autocvar_g_vehicle_racer_afterburn_cost;
+float autocvar_g_vehicle_racer_anglestabilizer;
+float autocvar_g_vehicle_racer_downforce;
+float autocvar_g_vehicle_racer_energy;
+float autocvar_g_vehicle_racer_energy_usepause;
+float autocvar_g_vehicle_racer_health;
+float autocvar_g_vehicle_racer_laser_cost;
+float autocvar_g_vehicle_racer_laser_damage;
+float autocvar_g_vehicle_racer_laser_radius;
+float autocvar_g_vehicle_racer_laser_refire;
+float autocvar_g_vehicle_racer_laser_speed;
+float autocvar_g_vehicle_racer_pitchspeed;
+float autocvar_g_vehicle_racer_power_air;
+float autocvar_g_vehicle_racer_power_min;
+float autocvar_g_vehicle_racer_power_solid;
+float autocvar_g_vehicle_racer_reload;
+float autocvar_g_vehicle_racer_respawntime;
+float autocvar_g_vehicle_racer_rocket_accel;
+float autocvar_g_vehicle_racer_rocket_damage;
+float autocvar_g_vehicle_racer_rocket_radius;
+float autocvar_g_vehicle_racer_rocket_refire;
+float autocvar_g_vehicle_racer_rocket_speed;
+float autocvar_g_vehicle_racer_rocket_turnrate;
+float autocvar_g_vehicle_racer_shield;
+float autocvar_g_vehicle_racer_speed_afterburn;
+float autocvar_g_vehicle_racer_speed_forward;
+float autocvar_g_vehicle_racer_speed_strafe;
+float autocvar_g_vehicle_racer_springlength;
+float autocvar_g_vehicle_racer_turnroll;
+float autocvar_g_vehicle_racer_turnspeed;
+float autocvar_g_vehicle_raptor_reload;
+float autocvar_g_vehicle_spiderbot_crush_dmg;
+float autocvar_g_vehicle_spiderbot_crush_force;
+float autocvar_g_vehicle_spiderbot_head_pitchlimit_down;
+float autocvar_g_vehicle_spiderbot_head_pitchlimit_up;
+float autocvar_g_vehicle_spiderbot_head_pitchspeed;
+float autocvar_g_vehicle_spiderbot_head_turnlimit;
+float autocvar_g_vehicle_spiderbot_head_turnspeed;
+float autocvar_g_vehicle_spiderbot_health;
+float autocvar_g_vehicle_spiderbot_minigun_cooldown;
+float autocvar_g_vehicle_spiderbot_minigun_damage;
+float autocvar_g_vehicle_spiderbot_minigun_heat;
+float autocvar_g_vehicle_spiderbot_minigun_refire;
+float autocvar_g_vehicle_spiderbot_minigun_spread;
+float autocvar_g_vehicle_spiderbot_movement_inertia;
+float autocvar_g_vehicle_spiderbot_respawntime;
+float autocvar_g_vehicle_spiderbot_rocket_damage;
+float autocvar_g_vehicle_spiderbot_rocket_edgedamage;
+float autocvar_g_vehicle_spiderbot_rocket_force;
+float autocvar_g_vehicle_spiderbot_rocket_health;
+float autocvar_g_vehicle_spiderbot_rocket_lifetime;
+float autocvar_g_vehicle_spiderbot_rocket_noise;
+float autocvar_g_vehicle_spiderbot_rocket_radius;
+float autocvar_g_vehicle_spiderbot_rocket_refire;
+float autocvar_g_vehicle_spiderbot_rocket_reload;
+float autocvar_g_vehicle_spiderbot_rocket_speed;
+float autocvar_g_vehicle_spiderbot_rocket_turnrate;
+float autocvar_g_vehicle_spiderbot_shield;
+float autocvar_g_vehicle_spiderbot_speed_stop;
+float autocvar_g_vehicle_spiderbot_speed_strafe;
+float autocvar_g_vehicle_spiderbot_speed_walk;
+float autocvar_g_vehicle_spiderbot_turnspeed;
+float autocvar_g_waypointeditor;
+float autocvar_g_waypoints_for_items;
+float autocvar_g_waypointsprite_deadlifetime;
+float autocvar_g_waypointsprite_deployed_lifetime;
+float autocvar_g_waypointsprite_limitedrange;
+float autocvar_g_weapon_charge_colormod_blue_full;
+float autocvar_g_weapon_charge_colormod_blue_half;
+float autocvar_g_weapon_charge_colormod_green_full;
+float autocvar_g_weapon_charge_colormod_green_half;
+float autocvar_g_weapon_charge_colormod_hdrmultiplier;
+float autocvar_g_weapon_charge_colormod_red_full;
+float autocvar_g_weapon_charge_colormod_red_half;
+#define autocvar_g_weapon_stay cvar("g_weapon_stay")
+float autocvar_g_weapon_throwable;
+#define autocvar_g_weaponarena cvar_string("g_weaponarena")
+string autocvar_g_xonoticversion;
+float autocvar_gamecfg;
+float autocvar_gameversion;
+string autocvar_hostname;
+float autocvar_lastlevel;
+float autocvar_leadlimit;
+float autocvar_leadlimit_and_fraglimit;
+float autocvar_leadlimit_override;
+float autocvar_loddebug;
+float autocvar_minplayers;
+string autocvar_nextmap;
+float autocvar_prvm_backtraceforwarnings;
+string autocvar_quit_and_redirect;
+float autocvar_quit_when_empty;
+float autocvar_r_showbboxes;
+float autocvar_rescan_pending;
+float autocvar_samelevel;
+#define autocvar_skill cvar("skill")
+float autocvar_skill_auto;
+#define autocvar_slowmo cvar("slowmo")
+float autocvar_snd_soundradius;
+float autocvar_spawn_debug;
+float autocvar_spawn_debugview;
+float autocvar_speedmeter;
 float autocvar_sv_accelerate;
-float autocvar_sv_friction;
-float autocvar_sv_maxspeed;
-float autocvar_sv_airaccelerate;
-float autocvar_sv_maxairspeed;
-float autocvar_sv_stopspeed;
-float autocvar_sv_gravity;
-float autocvar_sv_airaccel_sideways_friction;
+var float autocvar_sv_accuracy_data_share = 1;
+string autocvar_sv_adminnick;
 float autocvar_sv_airaccel_qw;
+float autocvar_sv_airaccel_sideways_friction;
+float autocvar_sv_airaccelerate;
+float autocvar_sv_aircontrol;
+float autocvar_sv_aircontrol_penalty;
+float autocvar_sv_aircontrol_power;
+float autocvar_sv_airspeedlimit_nonqw;
 float autocvar_sv_airstopaccelerate;
+float autocvar_sv_airstrafeaccel_qw;
 float autocvar_sv_airstrafeaccelerate;
+float autocvar_sv_allow_shownames;
+float autocvar_sv_autoscreenshot;
+float autocvar_sv_cheats;
+float autocvar_sv_curl_serverpackages_auto;
+float autocvar_sv_db_saveasdump;
+float autocvar_sv_defaultcharacter;
+string autocvar_sv_defaultplayercolors;
+string autocvar_sv_defaultplayermodel;
+string autocvar_sv_defaultplayermodel_blue;
+string autocvar_sv_defaultplayermodel_pink;
+string autocvar_sv_defaultplayermodel_red;
+string autocvar_sv_defaultplayermodel_yellow;
+float autocvar_sv_defaultplayerskin;
+float autocvar_sv_dodging_delay;
+float autocvar_sv_dodging_height_threshold;
+float autocvar_sv_dodging_horiz_speed;
+float autocvar_sv_dodging_ramp_time;
+float autocvar_sv_dodging_sound;
+float autocvar_sv_dodging_up_speed;
+float autocvar_sv_dodging_wall_distance_threshold;
+float autocvar_sv_dodging_wall_dodging;
+float autocvar_sv_eventlog;
+float autocvar_sv_eventlog_console;
+float autocvar_sv_eventlog_files;
+float autocvar_sv_eventlog_files_counter;
+string autocvar_sv_eventlog_files_nameprefix;
+string autocvar_sv_eventlog_files_namesuffix;
+float autocvar_sv_eventlog_files_timestamps;
+float autocvar_sv_fragmessage_information_handicap;
+float autocvar_sv_fragmessage_information_ping;
+float autocvar_sv_fragmessage_information_stats;
+float autocvar_sv_fragmessage_information_typefrag;
+float autocvar_sv_friction;
+float autocvar_sv_friction_on_land;
+float autocvar_sv_gameplayfix_q2airaccelerate;
+#define autocvar_sv_gravity cvar("sv_gravity")
+float autocvar_sv_hitsound_antispam_time;
+string autocvar_sv_intermission_cdtrack;
+string autocvar_sv_jumpspeedcap_max;
+float autocvar_sv_jumpspeedcap_max_disable_on_ramps;
+string autocvar_sv_jumpspeedcap_min;
+float autocvar_sv_jumpvelocity;
+float autocvar_sv_logscores_bots;
+float autocvar_sv_logscores_console;
+float autocvar_sv_logscores_file;
+string autocvar_sv_logscores_filename;
+float autocvar_sv_mapchange_delay;
+float autocvar_sv_maxairspeed;
 float autocvar_sv_maxairstrafespeed;
-float autocvar_sv_airstrafeaccel_qw;
-float autocvar_sv_aircontrol;
-float autocvar_sv_aircontrol_power;
-float autocvar_sv_aircontrol_penalty;
-float autocvar_sv_warsowbunny_airforwardaccel;
+float autocvar_sv_maxspeed;
+string autocvar_sv_motd;
+string autocvar_sv_player_crouch_maxs;
+string autocvar_sv_player_crouch_mins;
+string autocvar_sv_player_crouch_viewoffset;
+string autocvar_sv_player_headsize;
+string autocvar_sv_player_maxs;
+string autocvar_sv_player_mins;
+string autocvar_sv_player_viewoffset;
+float autocvar_sv_precacheplayermodels;
+float autocvar_sv_precacheweapons;
+float autocvar_sv_q3acompat_machineshotgunswap;
+float autocvar_sv_qcweaponanimation;
+float autocvar_sv_ready_restart;
+float autocvar_sv_ready_restart_after_countdown;
+float autocvar_sv_ready_restart_repeatable;
+float autocvar_sv_servermodelsonly;
+float autocvar_sv_spectate;
+float autocvar_sv_spectator_speed_multiplier;
+float autocvar_sv_stepheight;
+float autocvar_sv_stopspeed;
+float autocvar_sv_strengthsound_antispam_refire_threshold;
+float autocvar_sv_strengthsound_antispam_time;
+float autocvar_sv_teamnagger;
+float autocvar_sv_timeout;
+float autocvar_sv_timeout_leadtime;
+float autocvar_sv_timeout_length;
+float autocvar_sv_timeout_number;
+float autocvar_sv_timeout_resumetime;
+float autocvar_sv_vote_call;
+float autocvar_sv_vote_change;
+string autocvar_sv_vote_commands;
+float autocvar_sv_vote_majority_factor;
+float autocvar_sv_vote_master;
+string autocvar_sv_vote_master_commands;
+string autocvar_sv_vote_master_password;
+float autocvar_sv_vote_nospectators;
+string autocvar_sv_vote_only_commands;
+float autocvar_sv_vote_override_mostrecent;
+float autocvar_sv_vote_simple_majority_factor;
+float autocvar_sv_vote_singlecount;
+float autocvar_sv_vote_stop;
+float autocvar_sv_vote_timeout;
+float autocvar_sv_vote_wait;
 float autocvar_sv_warsowbunny_accel;
+float autocvar_sv_warsowbunny_airforwardaccel;
+float autocvar_sv_warsowbunny_backtosideratio;
 float autocvar_sv_warsowbunny_topspeed;
 float autocvar_sv_warsowbunny_turnaccel;
-float autocvar_sv_warsowbunny_backtosideratio;
-float autocvar_sv_airspeedlimit_nonqw;
+string autocvar_sv_weaponstats_damagefile;
+string autocvar_sv_weaponstats_killfile;
+float autocvar_sys_ticrate;
+float autocvar_teamplay_lockonrestart;
+float autocvar_teamplay_mode;
+#define autocvar_timelimit cvar("timelimit")
+#define autocvar_timelimit_override cvar("timelimit_override")
+float autocvar_timelimit_overtime;
+float autocvar_timelimit_overtimes;
+float autocvar_timelimit_suddendeath;
+#define autocvar_utf8_enable cvar("utf8_enable")
+float autocvar_waypoint_benchmark;
+float autocvar_welcome_message_time;
index e6950dd..1911daf 100644 (file)
@@ -176,7 +176,7 @@ float bot_aimdir(vector v, float maxfiredeviation)
        if (time >= self.bot_badaimtime)
        {
                self.bot_badaimtime = max(self.bot_badaimtime + 0.3, time);
-               self.bot_badaimoffset = randomvec() * bound(0, 5 - 0.5 * (skill+self.bot_offsetskill), 5) * cvar("bot_ai_aimskill_offset");
+               self.bot_badaimoffset = randomvec() * bound(0, 5 - 0.5 * (skill+self.bot_offsetskill), 5) * autocvar_bot_ai_aimskill_offset;
        }
        desiredang = vectoangles(v) + self.bot_badaimoffset;
        //dprint(" desired:", vtos(desiredang));
@@ -206,25 +206,25 @@ float bot_aimdir(vector v, float maxfiredeviation)
        self.bot_prevaimtime = time;
        // Here we will try to anticipate the comming aiming direction
        self.bot_1st_order_aimfilter= self.bot_1st_order_aimfilter
-               + (diffang * (1 / delta_t)    - self.bot_1st_order_aimfilter) * bound(0, cvar("bot_ai_aimskill_order_filter_1st"),1);
+               + (diffang * (1 / delta_t)    - self.bot_1st_order_aimfilter) * bound(0, autocvar_bot_ai_aimskill_order_filter_1st,1);
        self.bot_2nd_order_aimfilter= self.bot_2nd_order_aimfilter
-               + (self.bot_1st_order_aimfilter - self.bot_2nd_order_aimfilter) * bound(0, cvar("bot_ai_aimskill_order_filter_2nd"),1);
+               + (self.bot_1st_order_aimfilter - self.bot_2nd_order_aimfilter) * bound(0, autocvar_bot_ai_aimskill_order_filter_2nd,1);
        self.bot_3th_order_aimfilter= self.bot_3th_order_aimfilter
-               + (self.bot_2nd_order_aimfilter - self.bot_3th_order_aimfilter) * bound(0, cvar("bot_ai_aimskill_order_filter_3th"),1);
+               + (self.bot_2nd_order_aimfilter - self.bot_3th_order_aimfilter) * bound(0, autocvar_bot_ai_aimskill_order_filter_3th,1);
        self.bot_4th_order_aimfilter= self.bot_4th_order_aimfilter
-               + (self.bot_3th_order_aimfilter - self.bot_4th_order_aimfilter) * bound(0, cvar("bot_ai_aimskill_order_filter_4th"),1);
+               + (self.bot_3th_order_aimfilter - self.bot_4th_order_aimfilter) * bound(0, autocvar_bot_ai_aimskill_order_filter_4th,1);
        self.bot_5th_order_aimfilter= self.bot_5th_order_aimfilter
-               + (self.bot_4th_order_aimfilter - self.bot_5th_order_aimfilter) * bound(0, cvar("bot_ai_aimskill_order_filter_5th"),1);
+               + (self.bot_4th_order_aimfilter - self.bot_5th_order_aimfilter) * bound(0, autocvar_bot_ai_aimskill_order_filter_5th,1);
 
        //blend = (bound(0,skill,10)*0.1)*pow(1-bound(0,skill,10)*0.05,2.5)*5.656854249; //Plot formule before changing !
        blend = bound(0,skill+self.bot_aimskill,10)*0.1;
        desiredang = desiredang + blend *
        (
-                 self.bot_1st_order_aimfilter * cvar("bot_ai_aimskill_order_mix_1st")
-               + self.bot_2nd_order_aimfilter * cvar("bot_ai_aimskill_order_mix_2nd")
-               + self.bot_3th_order_aimfilter * cvar("bot_ai_aimskill_order_mix_3th")
-               + self.bot_4th_order_aimfilter * cvar("bot_ai_aimskill_order_mix_4th")
-               + self.bot_5th_order_aimfilter * cvar("bot_ai_aimskill_order_mix_5th")
+                 self.bot_1st_order_aimfilter * autocvar_bot_ai_aimskill_order_mix_1st
+               + self.bot_2nd_order_aimfilter * autocvar_bot_ai_aimskill_order_mix_2nd
+               + self.bot_3th_order_aimfilter * autocvar_bot_ai_aimskill_order_mix_3th
+               + self.bot_4th_order_aimfilter * autocvar_bot_ai_aimskill_order_mix_4th
+               + self.bot_5th_order_aimfilter * autocvar_bot_ai_aimskill_order_mix_5th
        );
 
        // calculate turn angles
@@ -248,7 +248,7 @@ float bot_aimdir(vector v, float maxfiredeviation)
        diffang_y = diffang_y - floor(diffang_y / 360) * 360;
        if (diffang_y >= 180)
                diffang_y = diffang_y - 360;
-       desiredang = desiredang + diffang * bound(0,cvar("bot_ai_aimskill_think"),1);
+       desiredang = desiredang + diffang * bound(0,autocvar_bot_ai_aimskill_think,1);
 
        // calculate turn angles
        diffang = desiredang - self.v_angle;
@@ -264,12 +264,12 @@ float bot_aimdir(vector v, float maxfiredeviation)
 
        // turn
        local float r, fixedrate, blendrate;
-       fixedrate = cvar("bot_ai_aimskill_fixedrate") / bound(1,dist,1000);
-       blendrate = cvar("bot_ai_aimskill_blendrate");
+       fixedrate = autocvar_bot_ai_aimskill_fixedrate / bound(1,dist,1000);
+       blendrate = autocvar_bot_ai_aimskill_blendrate;
        r = max(fixedrate, blendrate);
        //self.v_angle = self.v_angle + diffang * bound(frametime, r * frametime * (2+skill*skill*0.05-random()*0.05*(10-skill)), 1);
        self.v_angle = self.v_angle + diffang * bound(delta_t, r * delta_t * (2+pow(skill+self.bot_mouseskill,3)*0.005-random()), 1);
-       self.v_angle = self.v_angle * bound(0,cvar("bot_ai_aimskill_mouse"),1) + desiredang * bound(0,(1-cvar("bot_ai_aimskill_mouse")),1);
+       self.v_angle = self.v_angle * bound(0,autocvar_bot_ai_aimskill_mouse,1) + desiredang * bound(0,(1-autocvar_bot_ai_aimskill_mouse),1);
        //self.v_angle = self.v_angle + diffang * bound(0, r * frametime * (skill * 0.5 + 2), 1);
        //self.v_angle = self.v_angle + diffang * (1/ blendrate);
        self.v_angle_z = 0;
@@ -339,10 +339,10 @@ float bot_aim(float shotspeed, float shotspeedupward, float maxshottime, float a
        shotdir = v_forward;
        v = bot_shotlead(self.bot_aimtargorigin, self.bot_aimtargvelocity, shotspeed, self.bot_aimlatency);
        local float distanceratio;
-       distanceratio =sqrt(bound(0,skill,10000))*0.3*(vlen(v-shotorg)-100)/cvar("bot_ai_aimskill_firetolerance_distdegrees");
+       distanceratio =sqrt(bound(0,skill,10000))*0.3*(vlen(v-shotorg)-100)/autocvar_bot_ai_aimskill_firetolerance_distdegrees;
        distanceratio = bound(0,distanceratio,1);
-       r =  (cvar("bot_ai_aimskill_firetolerance_maxdegrees")-cvar("bot_ai_aimskill_firetolerance_mindegrees"))
-               * (1-distanceratio) + cvar("bot_ai_aimskill_firetolerance_mindegrees");
+       r =  (autocvar_bot_ai_aimskill_firetolerance_maxdegrees-autocvar_bot_ai_aimskill_firetolerance_mindegrees)
+               * (1-distanceratio) + autocvar_bot_ai_aimskill_firetolerance_mindegrees;
        if (applygravity && self.bot_aimtarg)
        {
                if (!findtrajectorywithleading(shotorg, '0 0 0', '0 0 0', self.bot_aimtarg, shotspeed, shotspeedupward, maxshottime, 0, self))
index a784ef4..581e3f0 100644 (file)
@@ -33,17 +33,17 @@ void bot_think()
                return;
 
        self.flags &~= FL_GODMODE;
-       if(cvar("bot_god"))
+       if(autocvar_bot_god)
                self.flags |= FL_GODMODE;
 
-       self.bot_nextthink = self.bot_nextthink + cvar("bot_ai_thinkinterval") * pow(0.5, self.bot_aiskill);
+       self.bot_nextthink = self.bot_nextthink + autocvar_bot_ai_thinkinterval * pow(0.5, self.bot_aiskill);
        //if (self.bot_painintensity > 0)
        //      self.bot_painintensity = self.bot_painintensity - (skill + 1) * 40 * frametime;
 
        //self.bot_painintensity = self.bot_painintensity + self.bot_oldhealth - self.health;
        //self.bot_painintensity = bound(0, self.bot_painintensity, 100);
 
-       if (cvar("g_campaign") && !campaign_bots_may_start)
+       if (autocvar_g_campaign && !campaign_bots_may_start)
        {
                self.nextthink = time + 0.5;
                return;
@@ -112,21 +112,21 @@ void bot_setnameandstuff()
        string bot_name, bot_model, bot_skin, bot_shirt, bot_pants;
        string name, prefix, suffix;
 
-       if(cvar("g_campaign"))
+       if(autocvar_g_campaign)
        {
                prefix = "";
                suffix = "";
        }
        else
        {
-               prefix = cvar_string("bot_prefix");
-               suffix = cvar_string("bot_suffix");
+               prefix = autocvar_bot_prefix;
+               suffix = autocvar_bot_suffix;
        }
 
-       file = fopen(cvar_string("bot_config_file"), FILE_READ);
+       file = fopen(autocvar_bot_config_file, FILE_READ);
 
        if(file < 0)
-               print(strcat("Error: Can not open the bot configuration file '",cvar_string("bot_config_file"),"'\n"));
+               print(strcat("Error: Can not open the bot configuration file '",autocvar_bot_config_file,"'\n"));
        else
        {
                RandomSelection_Init();
@@ -177,7 +177,7 @@ void bot_setnameandstuff()
 
        prio = 6;
 
-       #define READSKILL(f,w,r) if(argv(prio) != "") self.f = stof(argv(prio)) * (w); else self.f = (!cvar("g_campaign")) * (2 * random() - 1) * (r) * (w); ++prio
+       #define READSKILL(f,w,r) if(argv(prio) != "") self.f = stof(argv(prio)) * (w); else self.f = (!autocvar_g_campaign) * (2 * random() - 1) * (r) * (w); ++prio
        //print(bot_name, ": ping=", argv(9), "\n");
 
        READSKILL(havocbot_keyboardskill, 0.5, 0.5); // keyboard skill
@@ -204,7 +204,7 @@ void bot_setnameandstuff()
        self.bot_preferredcolors = self.clientcolors;
 
        // pick the name
-       if (cvar("bot_usemodelnames"))
+       if (autocvar_bot_usemodelnames)
                name = bot_model;
        else
                name = bot_name;
@@ -241,15 +241,15 @@ void bot_custom_weapon_priority_setup()
 
        bot_custom_weapon = FALSE;
 
-       if(     cvar_string("bot_ai_custom_weapon_priority_far") == "" ||
-               cvar_string("bot_ai_custom_weapon_priority_mid") == "" ||
-               cvar_string("bot_ai_custom_weapon_priority_close") == "" ||
-               cvar_string("bot_ai_custom_weapon_priority_distances") == ""
+       if(     autocvar_bot_ai_custom_weapon_priority_far == "" ||
+               autocvar_bot_ai_custom_weapon_priority_mid == "" ||
+               autocvar_bot_ai_custom_weapon_priority_close == "" ||
+               autocvar_bot_ai_custom_weapon_priority_distances == ""
        )
                return;
 
        // Parse distances
-       tokens = tokenizebyseparator(cvar_string("bot_ai_custom_weapon_priority_distances")," ");
+       tokens = tokenizebyseparator(autocvar_bot_ai_custom_weapon_priority_distances," ");
 
        if (tokens!=2)
                return;
@@ -268,7 +268,7 @@ void bot_custom_weapon_priority_setup()
        bot_weapons_close[0] = -1;
 
        // Parse far distance weapon priorities
-       tokens = tokenizebyseparator(W_NumberWeaponOrder(cvar_string("bot_ai_custom_weapon_priority_far"))," ");
+       tokens = tokenizebyseparator(W_NumberWeaponOrder(autocvar_bot_ai_custom_weapon_priority_far)," ");
 
        c = 0;
        for(i=0; i < tokens && c < WEP_COUNT; ++i){
@@ -282,7 +282,7 @@ void bot_custom_weapon_priority_setup()
                bot_weapons_far[c] = -1;
 
        // Parse mid distance weapon priorities
-       tokens = tokenizebyseparator(W_NumberWeaponOrder(cvar_string("bot_ai_custom_weapon_priority_mid"))," ");
+       tokens = tokenizebyseparator(W_NumberWeaponOrder(autocvar_bot_ai_custom_weapon_priority_mid)," ");
 
        c = 0;
        for(i=0; i < tokens && c < WEP_COUNT; ++i){
@@ -296,7 +296,7 @@ void bot_custom_weapon_priority_setup()
                bot_weapons_mid[c] = -1;
 
        // Parse close distance weapon priorities
-       tokens = tokenizebyseparator(W_NumberWeaponOrder(cvar_string("bot_ai_custom_weapon_priority_close"))," ");
+       tokens = tokenizebyseparator(W_NumberWeaponOrder(autocvar_bot_ai_custom_weapon_priority_close)," ");
 
        c = 0;
        for(i=0; i < tokens && i < WEP_COUNT; ++i){
@@ -498,20 +498,20 @@ void autoskill(float factor)
        }
        else if(bestbot <= bestplayer * factor - 2)
        {
-               if(cvar("skill") < 17)
+               if(autocvar_skill < 17)
                {
                        dprint("2 frags difference, increasing skill\n");
-                       cvar_set("skill", ftos(cvar("skill") + 1));
-                       bprint("^2SKILL UP!^7 Now at level ", ftos(cvar("skill")), "\n");
+                       cvar_set("skill", ftos(autocvar_skill + 1));
+                       bprint("^2SKILL UP!^7 Now at level ", ftos(autocvar_skill), "\n");
                }
        }
        else if(bestbot >= bestplayer * factor + 2)
        {
-               if(cvar("skill") > 0)
+               if(autocvar_skill > 0)
                {
                        dprint("2 frags difference, decreasing skill\n");
-                       cvar_set("skill", ftos(cvar("skill") - 1));
-                       bprint("^1SKILL DOWN!^7 Now at level ", ftos(cvar("skill")), "\n");
+                       cvar_set("skill", ftos(autocvar_skill - 1));
+                       bprint("^1SKILL DOWN!^7 Now at level ", ftos(autocvar_skill), "\n");
                }
        }
        else
@@ -536,13 +536,13 @@ void bot_serverframe()
        if (time < 2)
                return;
 
-       stepheightvec = cvar("sv_stepheight") * '0 0 1';
-       bot_navigation_movemode = ((cvar("bot_navigation_ignoreplayers")) ? MOVE_NOMONSTERS : MOVE_NORMAL);
+       stepheightvec = autocvar_sv_stepheight * '0 0 1';
+       bot_navigation_movemode = ((autocvar_bot_navigation_ignoreplayers) ? MOVE_NOMONSTERS : MOVE_NORMAL);
 
        if(time > autoskill_nextthink)
        {
                float a;
-               a = cvar("skill_auto");
+               a = autocvar_skill_auto;
                if(a)
                        autoskill(a);
                autoskill_nextthink = time + 5;
@@ -563,16 +563,16 @@ void bot_serverframe()
        // But don't remove bots immediately on level change, as the real players
        // usually haven't rejoined yet
        bots_would_leave = FALSE;
-       if (teams_matter && cvar("bot_vs_human") && (c3==-1 && c4==-1))
-               bots = min(ceil(fabs(cvar("bot_vs_human")) * activerealplayers), maxclients - realplayers);
-       else if ((realplayers || cvar("bot_join_empty") || (currentbots > 0 && time < 5)))
+       if (teams_matter && autocvar_bot_vs_human && (c3==-1 && c4==-1))
+               bots = min(ceil(fabs(autocvar_bot_vs_human) * activerealplayers), maxclients - realplayers);
+       else if ((realplayers || autocvar_bot_join_empty || (currentbots > 0 && time < 5)))
        {
                float realminplayers, minplayers;
-               realminplayers = cvar("minplayers");
+               realminplayers = autocvar_minplayers;
                minplayers = max(0, floor(realminplayers));
 
                float realminbots, minbots;
-               realminbots = cvar("bot_number");
+               realminbots = autocvar_bot_number;
                minbots = max(0, floor(realminbots));
 
                bots = min(max(minbots, minplayers - activerealplayers), maxclients - realplayers);
@@ -585,7 +585,7 @@ void bot_serverframe()
                bots = 0;
        }
 
-       bot_ignore_bots = cvar("bot_ignore_bots");
+       bot_ignore_bots = autocvar_bot_ignore_bots;
 
        // only add one bot per frame to avoid utter chaos
        if(time > botframe_nextthink)
@@ -606,11 +606,11 @@ void bot_serverframe()
 
        if(botframe_spawnedwaypoints)
        {
-               if(cvar("waypoint_benchmark"))
+               if(autocvar_waypoint_benchmark)
                        localcmd("quit\n");
        }
 
-       if (currentbots > 0 || cvar("g_waypointeditor"))
+       if (currentbots > 0 || autocvar_g_waypointeditor)
        if (botframe_spawnedwaypoints)
        {
                if(botframe_cachedwaypointlinks)
@@ -651,15 +651,15 @@ void bot_serverframe()
                if (botframe_nextdangertime < time)
                {
                        local float interval;
-                       interval = cvar("bot_ai_dangerdetectioninterval");
+                       interval = autocvar_bot_ai_dangerdetectioninterval;
                        if (botframe_nextdangertime < time - interval * 1.5)
                                botframe_nextdangertime = time;
                        botframe_nextdangertime = botframe_nextdangertime + interval;
-                       botframe_updatedangerousobjects(cvar("bot_ai_dangerdetectionupdates"));
+                       botframe_updatedangerousobjects(autocvar_bot_ai_dangerdetectionupdates);
                }
        }
 
-       if (cvar("g_waypointeditor"))
+       if (autocvar_g_waypointeditor)
                botframe_showwaypointlinks();
 
        if(time > bot_cvar_nextthink)
index 5ed7862..c1785a8 100644 (file)
@@ -80,7 +80,7 @@ void havocbot_ai()
        havocbot_chooseenemy();
        if (self.bot_chooseweapontime < time )
        {
-               self.bot_chooseweapontime = time + cvar("bot_ai_chooseweaponinterval");
+               self.bot_chooseweapontime = time + autocvar_bot_ai_chooseweaponinterval;
                havocbot_chooseweapon();
        }
        havocbot_aim();
@@ -93,7 +93,7 @@ void havocbot_ai()
                if(self.weapons)
                {
                        weapon_action(self.weapon, WR_AIM);
-                       if (cvar("bot_nofire") || IS_INDEPENDENT_PLAYER(self))
+                       if (autocvar_bot_nofire || IS_INDEPENDENT_PLAYER(self))
                        {
                                self.BUTTON_ATCK = FALSE;
                                self.BUTTON_ATCK2 = FALSE;
@@ -128,7 +128,7 @@ void havocbot_ai()
                        next = self.goalstack01.origin - (self.origin + self.view_ofs);
 
                skillblend=bound(0,(skill+self.bot_moveskill-2.5)*0.5,1); //lower skill player can't preturn
-               distanceblend=bound(0,aimdistance/cvar("bot_ai_keyboard_distance"),1);
+               distanceblend=bound(0,aimdistance/autocvar_bot_ai_keyboard_distance,1);
                blend = skillblend * (1-distanceblend);
                //v = (now * (distanceblend) + next * (1-distanceblend)) * (skillblend) + now * (1-skillblend);
                //v = now * (distanceblend) * (skillblend) + next * (1-distanceblend) * (skillblend) + now * (1-skillblend);
@@ -154,7 +154,7 @@ void havocbot_keyboard_movement(vector destorg)
 
        sk = skill + self.bot_moveskill;
 
-       maxspeed = cvar("sv_maxspeed");
+       maxspeed = autocvar_sv_maxspeed;
 
        if (time < self.havocbot_keyboardtime)
                return;
@@ -169,7 +169,7 @@ void havocbot_keyboard_movement(vector destorg)
 
        local float trigger, trigger1;
        blend = bound(0,sk*0.1,1);
-       trigger = cvar("bot_ai_keyboard_treshold");
+       trigger = autocvar_bot_ai_keyboard_treshold;
        trigger1 = 0 - trigger;
 
        // categorize forward movement
@@ -216,7 +216,7 @@ void havocbot_keyboard_movement(vector destorg)
        if (self.havocbot_ducktime>time) self.BUTTON_CROUCH=TRUE;
 
        keyboard = self.havocbot_keyboard;
-       blend = bound(0,vlen(destorg-self.origin)/cvar("bot_ai_keyboard_distance"),1); // When getting close move with 360 degree
+       blend = bound(0,vlen(destorg-self.origin)/autocvar_bot_ai_keyboard_distance,1); // When getting close move with 360 degree
        //dprint("movement ", vtos(self.movement), " keyboard ", vtos(keyboard), " blend ", ftos(blend), "\n");
        self.movement = self.movement + (keyboard - self.movement) * blend;
 };
@@ -227,7 +227,7 @@ void havocbot_bunnyhop(vector dir)
        local vector deviation;
        local float maxspeed;
 
-       if(cvar("g_midair"))
+       if(autocvar_g_midair)
                return;
 
        // Don't jump when using some weapons
@@ -238,7 +238,7 @@ void havocbot_bunnyhop(vector dir)
        if(self.goalcurrent.classname == "player")
                return;
 
-       maxspeed = cvar("sv_maxspeed");
+       maxspeed = autocvar_sv_maxspeed;
 
        if(self.aistatus & AI_STATUS_DANGER_AHEAD)
        {
@@ -274,7 +274,7 @@ void havocbot_bunnyhop(vector dir)
                        if(self.bot_timelastseengoal)
                        {
                                // for a period of time
-                               if(time - self.bot_timelastseengoal > cvar("bot_ai_bunnyhop_firstjumpdelay"))
+                               if(time - self.bot_timelastseengoal > autocvar_bot_ai_bunnyhop_firstjumpdelay)
                                {
                                        local float checkdistance;
                                        checkdistance = TRUE;
@@ -282,7 +282,7 @@ void havocbot_bunnyhop(vector dir)
                                        // don't run if it is too close
                                        if(self.bot_canruntogoal==0)
                                        {
-                                               if(bunnyhopdistance > cvar("bot_ai_bunnyhop_startdistance"))
+                                               if(bunnyhopdistance > autocvar_bot_ai_bunnyhop_startdistance)
                                                        self.bot_canruntogoal = 1;
                                                else
                                                        self.bot_canruntogoal = -1;
@@ -305,7 +305,7 @@ void havocbot_bunnyhop(vector dir)
                                                if(bunnyhopdistance < vlen(self.origin - self.goalstack01.origin))
                                                if(fabs(self.goalstack01.origin_z - self.goalcurrent.origin_z) < self.maxs_z - self.mins_z)
                                                {
-                                                       if(vlen(self.goalcurrent.origin - self.goalstack01.origin) > cvar("bot_ai_bunnyhop_startdistance"))
+                                                       if(vlen(self.goalcurrent.origin - self.goalstack01.origin) > autocvar_bot_ai_bunnyhop_startdistance)
                                                        if(checkpvs(self.origin + self.view_ofs, self.goalstack01))
                                                        {
                                                                checkdistance = FALSE;
@@ -316,7 +316,7 @@ void havocbot_bunnyhop(vector dir)
                                        if(checkdistance)
                                        {
                                                self.aistatus &~= AI_STATUS_RUNNING;
-                                               if(bunnyhopdistance > cvar("bot_ai_bunnyhop_stopdistance"))
+                                               if(bunnyhopdistance > autocvar_bot_ai_bunnyhop_stopdistance)
                                                        self.BUTTON_JUMP = TRUE;
                                        }
                                        else
@@ -379,7 +379,7 @@ void havocbot_movetogoal()
        //if (self.goalentity)
        //      te_lightning2(self, self.origin, (self.goalentity.absmin + self.goalentity.absmax) * 0.5);
        self.movement = '0 0 0';
-       maxspeed = cvar("sv_maxspeed");
+       maxspeed = autocvar_sv_maxspeed;
 
        // Jetpack navigation
        if(self.goalcurrent)
@@ -414,7 +414,7 @@ void havocbot_movetogoal()
                        dxy = self.origin - self.goalcurrent.origin; dxy_z = 0;
                        d = vlen(dxy);
                        v = vlen(self.velocity -  self.velocity_z * '0 0 1');
-                       db = (pow(v,2) / (cvar("g_jetpack_acceleration_side") * 2)) + 100;
+                       db = (pow(v,2) / (autocvar_g_jetpack_acceleration_side * 2)) + 100;
                //      dprint("distance ", ftos(ceil(d)), " velocity ", ftos(ceil(v)), " brake at ", ftos(ceil(db)), "\n");
                        if(d < db || d < 500)
                        {
@@ -491,7 +491,7 @@ void havocbot_movetogoal()
                                if(newgoal)
                                {
                                        self.ignoregoal = self.goalcurrent;
-                                       self.ignoregoaltime = time + cvar("bot_ai_ignoregoal_timeout");
+                                       self.ignoregoaltime = time + autocvar_bot_ai_ignoregoal_timeout;
                                        navigation_clearroute();
                                        navigation_routetogoal(newgoal, self.origin);
                                        self.aistatus &~= AI_STATUS_OUT_JUMPPAD;
@@ -559,7 +559,7 @@ void havocbot_movetogoal()
 
                        return;
                }
-               else if(self.health>cvar("g_balance_rocketlauncher_damage")*0.5)
+               else if(self.health>autocvar_g_balance_rocketlauncher_damage*0.5)
                {
                        if(self.velocity_z < 0)
                        if(client_hasweapon(self, WEP_ROCKET_LAUNCHER, TRUE, FALSE))
@@ -579,7 +579,7 @@ void havocbot_movetogoal()
                                self.switchweapon = WEP_ROCKET_LAUNCHER;
                                self.v_angle_x = 90;
                                self.BUTTON_ATCK = TRUE;
-                               self.rocketjumptime = time + cvar("g_balance_rocketlauncher_detonatedelay");
+                               self.rocketjumptime = time + autocvar_g_balance_rocketlauncher_detonatedelay;
                                return;
                        }
                }
@@ -702,7 +702,7 @@ void havocbot_movetogoal()
                                if(self.facingwalltime && time > self.facingwalltime)
                                {
                                        self.ignoregoal = self.goalcurrent;
-                                       self.ignoregoaltime = time + cvar("bot_ai_ignoregoal_timeout");
+                                       self.ignoregoaltime = time + autocvar_bot_ai_ignoregoal_timeout;
                                        self.bot_strategytime = 0;
                                        return;
                                }
@@ -808,10 +808,10 @@ void havocbot_movetogoal()
        // Bunnyhop!
 //     if(self.aistatus & AI_STATUS_ROAMING)
        if(self.goalcurrent)
-       if(skill+self.bot_moveskill >= cvar("bot_ai_bunnyhop_skilloffset"))
+       if(skill+self.bot_moveskill >= autocvar_bot_ai_bunnyhop_skilloffset)
                havocbot_bunnyhop(dir);
 
-       if ((dir * v_up) >= cvar("sv_jumpvelocity")*0.5 && (self.flags & FL_ONGROUND)) self.BUTTON_JUMP=1;
+       if ((dir * v_up) >= autocvar_sv_jumpvelocity*0.5 && (self.flags & FL_ONGROUND)) self.BUTTON_JUMP=1;
        if (((dodge * v_up) > 0) && random()*frametime >= 0.2*bound(0,(10-skill-self.bot_dodgeskill)*0.1,1)) self.BUTTON_JUMP=TRUE;
        if (((dodge * v_up) < 0) && random()*frametime >= 0.5*bound(0,(10-skill-self.bot_dodgeskill)*0.1,1)) self.havocbot_ducktime=time+0.3/bound(0.1,skill+self.bot_dodgeskill,10);
 };
@@ -821,7 +821,7 @@ void havocbot_chooseenemy()
        local entity head, best, head2;
        local float rating, bestrating, i, f;
        local vector eye, v;
-       if (cvar("bot_nofire") || IS_INDEPENDENT_PLAYER(self))
+       if (autocvar_bot_nofire || IS_INDEPENDENT_PLAYER(self))
        {
                self.enemy = world;
                return;
@@ -847,7 +847,7 @@ void havocbot_chooseenemy()
                        if (self.health > 30)
                        {
                                // remain tracking him for a shot while (case he went after a small corner or pilar
-                               self.havocbot_chooseenemy_finished = time + cvar("bot_ai_enemydetectioninterval");
+                               self.havocbot_chooseenemy_finished = time + autocvar_bot_ai_enemydetectioninterval;
                                return;
                        }
                        // enemy isn't visible, or is far away, or we're injured severely
@@ -858,7 +858,7 @@ void havocbot_chooseenemy()
        }
        if (time < self.havocbot_chooseenemy_finished)
                return;
-       self.havocbot_chooseenemy_finished = time + cvar("bot_ai_enemydetectioninterval");
+       self.havocbot_chooseenemy_finished = time + autocvar_bot_ai_enemydetectioninterval;
        eye = self.origin + self.view_ofs;
        best = world;
        bestrating = 100000000;
@@ -871,7 +871,7 @@ void havocbot_chooseenemy()
                {
                        v = (head.absmin + head.absmax) * 0.5;
                        rating = vlen(v - eye);
-                       if (rating<cvar("bot_ai_enemydetectionradius"))
+                       if (rating<autocvar_bot_ai_enemydetectionradius)
                        if (bestrating > rating)
                        if (bot_shouldattack(head))
                        {
@@ -942,7 +942,7 @@ void havocbot_chooseweapon()
 
        // Workaround for rifle reloading (..)
        if(self.weapon == WEP_CAMPINGRIFLE)
-       if(i < cvar("g_balance_campingrifle_reloadtime") + 1)
+       if(i < autocvar_g_balance_campingrifle_reloadtime + 1)
                return;
 
        local float w;
@@ -968,7 +968,7 @@ void havocbot_chooseweapon()
        local float af, ct, combo_time, combo;
 
        af = ATTACK_FINISHED(self);
-       ct = cvar("bot_ai_weapon_combo_threshold");
+       ct = autocvar_bot_ai_weapon_combo_threshold;
 
        // Bots with no skill will be 4 times more slower than "godlike" bots when doing weapon combos
        // Ideally this 4 should be calculated as longest_weapon_refire / bot_ai_weapon_combo_threshold
@@ -976,7 +976,7 @@ void havocbot_chooseweapon()
 
        combo = FALSE;
 
-       if(cvar("bot_ai_weapon_combo"))
+       if(autocvar_bot_ai_weapon_combo)
        if(self.weapon == self.lastfiredweapon)
        if(af > combo_time)
        {
index 1cb9181..0ec0abb 100644 (file)
@@ -251,7 +251,7 @@ void havocbot_role_ctf_carrier()
 
        if (self.bot_strategytime < time)
        {
-               self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+               self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
 
                navigation_goalrating_start();
                havocbot_goalrating_ctf_ourbase(50000);
@@ -324,7 +324,7 @@ void havocbot_role_ctf_escort()
        // Chase the flag carrier
        if (self.bot_strategytime < time)
        {
-               self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+               self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
                navigation_goalrating_start();
                havocbot_goalrating_ctf_enemyflag(30000);
                havocbot_goalrating_ctf_ourstolenflag(40000);
@@ -404,7 +404,7 @@ void havocbot_role_ctf_offense()
 
        if (self.bot_strategytime < time)
        {
-               self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+               self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
                navigation_goalrating_start();
                havocbot_goalrating_ctf_ourstolenflag(50000);
                havocbot_goalrating_ctf_enemybase(20000);
@@ -453,7 +453,7 @@ void havocbot_role_ctf_retriever()
                local float radius;
                radius = 10000;
 
-               self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+               self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
                navigation_goalrating_start();
                havocbot_goalrating_ctf_ourstolenflag(50000);
                havocbot_goalrating_ctf_droppedflags(40000, self.origin, radius);
@@ -502,7 +502,7 @@ void havocbot_role_ctf_middle()
                org = havocbot_ctf_middlepoint;
                org_z = self.origin_z;
 
-               self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+               self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
                navigation_goalrating_start();
                havocbot_goalrating_ctf_ourstolenflag(50000);
                havocbot_goalrating_ctf_droppedflags(30000, self.origin, 10000);
@@ -554,7 +554,7 @@ void havocbot_role_ctf_defense()
                org = mf.dropped_origin;
                radius = havocbot_ctf_middlepoint_radius;
 
-               self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+               self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
                navigation_goalrating_start();
 
                // if enemies are closer to our base, go there
index 7ac4a5f..8e30b37 100644 (file)
@@ -50,7 +50,7 @@ void havocbot_role_kh_carrier()
 
        if (self.bot_strategytime < time)
        {
-               self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+               self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
                navigation_goalrating_start();
 
                if(kh_Key_AllOwnedByWhichTeam() == self.team)
@@ -88,7 +88,7 @@ void havocbot_role_kh_defense()
        if (self.bot_strategytime < time)
        {
                float key_owner_team;
-               self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+               self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
                navigation_goalrating_start();
 
                key_owner_team = kh_Key_AllOwnedByWhichTeam();
@@ -130,7 +130,7 @@ void havocbot_role_kh_offense()
        {
                float key_owner_team;
 
-               self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+               self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
                navigation_goalrating_start();
 
                key_owner_team = kh_Key_AllOwnedByWhichTeam();
@@ -180,7 +180,7 @@ void havocbot_role_kh_freelancer()
        {
                float key_owner_team;
 
-               self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+               self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
                navigation_goalrating_start();
 
                key_owner_team = kh_Key_AllOwnedByWhichTeam();
index 3268dae..af6eeb6 100644 (file)
@@ -319,7 +319,7 @@ void havocbot_role_ons_offense()
                havocbot_goalrating_ons_offenseitems(10000, self.origin, 10000);
                navigation_goalrating_end();
 
-               self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+               self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
        }
 };
 
index 1e9231b..cfd0503 100644 (file)
@@ -112,7 +112,7 @@ void havocbot_goalrating_items(float ratingscale, vector org, float sradius)
 
                        // Rate the item only if no one needs it, or if an enemy is closer to it
                        if ( (enemy_distance < friend_distance && distance < enemy_distance) ||
-                               (friend_distance > cvar("bot_ai_friends_aware_pickup_radius") ) || !discard )
+                               (friend_distance > autocvar_bot_ai_friends_aware_pickup_radius ) || !discard )
                                rating = head.bot_pickupevalfunc(self, head);
 
                }
@@ -150,7 +150,7 @@ void havocbot_goalrating_enemyplayers(float ratingscale, vector org, float sradi
        local float t, noteam, distance;
        noteam = ((self.team == 0) || !teams_matter); // fteqcc sucks
 
-       if (cvar("bot_nofire"))
+       if (autocvar_bot_nofire)
                return;
 
        // don't chase players if we're under water
@@ -212,7 +212,7 @@ void havocbot_role_dom()
 
        if (self.bot_strategytime < time)
        {
-               self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+               self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
                navigation_goalrating_start();
                havocbot_goalrating_controlpoints(10000, self.origin, 15000);
                havocbot_goalrating_items(8000, self.origin, 8000);
@@ -231,7 +231,7 @@ void havocbot_role_dm()
 
        if (self.bot_strategytime < time)
        {
-               self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+               self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
                navigation_goalrating_start();
                havocbot_goalrating_items(10000, self.origin, 10000);
                havocbot_goalrating_enemyplayers(20000, self.origin, 10000);
@@ -251,7 +251,7 @@ void havocbot_role_race()
        entity e;
        if (self.bot_strategytime < time)
        {
-               self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+               self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
                navigation_goalrating_start();
                /*
                havocbot_goalrating_items(100, self.origin, 10000);
@@ -283,7 +283,7 @@ void havocbot_role_ka()
 
        if (self.bot_strategytime < time)
        {
-               self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+               self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
                navigation_goalrating_start();
                havocbot_goalrating_items(10000, self.origin, 10000);
                havocbot_goalrating_enemyplayers(20000, self.origin, 10000);
index cb6d16c..f3e5c26 100644 (file)
@@ -653,8 +653,8 @@ void navigation_routerating(entity e, float f, float rangebias)
        // Evaluate path using jetpack
        if(g_jetpack)
        if(self.items & IT_JETPACK)
-       if(cvar("bot_ai_navigation_jetpack"))
-       if(vlen(self.origin - e.origin) > cvar("bot_ai_navigation_jetpack_mindistance"))
+       if(autocvar_bot_ai_navigation_jetpack)
+       if(vlen(self.origin - e.origin) > autocvar_bot_ai_navigation_jetpack_mindistance)
        {
                vector pointa, pointb;
 
@@ -706,9 +706,9 @@ void navigation_routerating(entity e, float f, float rangebias)
                        xydistance = vlen(pointa - pointb);
                        zdistance = fabs(pointa_z - self.origin_z);
 
-                       t = zdistance / cvar("g_jetpack_maxspeed_up");
-                       t += xydistance / cvar("g_jetpack_maxspeed_side");
-                       fuel = t * cvar("g_jetpack_fuel") * 0.8;
+                       t = zdistance / autocvar_g_jetpack_maxspeed_up;
+                       t += xydistance / autocvar_g_jetpack_maxspeed_side;
+                       fuel = t * autocvar_g_jetpack_fuel * 0.8;
 
                //      dprint("jetpack ai: required fuel ", ftos(fuel), " self.ammo_fuel ", ftos(self.ammo_fuel),"\n");
 
@@ -719,8 +719,8 @@ void navigation_routerating(entity e, float f, float rangebias)
                                // (as onground costs calculation is mostly based on distances, here we do the same establishing some relationship
                                //  - between air and ground speeds)
 
-                               cost = xydistance / (cvar("g_jetpack_maxspeed_side")/cvar("sv_maxspeed"));
-                               cost += zdistance / (cvar("g_jetpack_maxspeed_up")/cvar("sv_maxspeed"));
+                               cost = xydistance / (autocvar_g_jetpack_maxspeed_side/autocvar_sv_maxspeed);
+                               cost += zdistance / (autocvar_g_jetpack_maxspeed_up/autocvar_sv_maxspeed);
                                cost *= 1.5;
 
                                // Compare against other goals
index 196e3d7..ef25a95 100644 (file)
@@ -868,14 +868,14 @@ float bot_presskeys()
                return FALSE;
 
        if(self.bot_cmd_keys & BOT_CMD_KEY_FORWARD)
-               self.movement_x = cvar("sv_maxspeed");
+               self.movement_x = autocvar_sv_maxspeed;
        else if(self.bot_cmd_keys & BOT_CMD_KEY_BACKWARD)
-               self.movement_x = -cvar("sv_maxspeed");
+               self.movement_x = -autocvar_sv_maxspeed;
 
        if(self.bot_cmd_keys & BOT_CMD_KEY_RIGHT)
-               self.movement_y = cvar("sv_maxspeed");
+               self.movement_y = autocvar_sv_maxspeed;
        else if(self.bot_cmd_keys & BOT_CMD_KEY_LEFT)
-               self.movement_y = -cvar("sv_maxspeed");
+               self.movement_y = -autocvar_sv_maxspeed;
 
        if(self.bot_cmd_keys & BOT_CMD_KEY_JUMP)
                self.BUTTON_JUMP = TRUE;
@@ -1269,7 +1269,7 @@ float bot_execute_commands_once()
        }
        else
        {
-               if(cvar("g_debug_bot_commands"))
+               if(autocvar_g_debug_bot_commands)
                {
                        local string parms;
 
index 4f3640e..b39e59f 100644 (file)
@@ -37,7 +37,7 @@ entity waypoint_spawn(vector m1, vector m2, float f)
                        }
                        else
                        {
-                               if(cvar("developer"))
+                               if(autocvar_developer)
                                {
                                        print("A generated waypoint is stuck in solid at ", vtos(w.origin), "\n");
                                        backtrace("Waypoint stuck");
@@ -50,7 +50,7 @@ entity waypoint_spawn(vector m1, vector m2, float f)
        waypoint_clearlinks(w);
        //waypoint_schedulerelink(w);
 
-       if (cvar("g_waypointeditor"))
+       if (autocvar_g_waypointeditor)
        {
                m1 = w.mins;
                m2 = w.maxs;
@@ -154,8 +154,8 @@ void waypoint_think()
        local entity e;
        local vector sv, sm1, sm2, ev, em1, em2, dv;
 
-       stepheightvec = cvar("sv_stepheight") * '0 0 1';
-       bot_navigation_movemode = ((cvar("bot_navigation_ignoreplayers")) ? MOVE_NOMONSTERS : MOVE_NORMAL);
+       stepheightvec = autocvar_sv_stepheight * '0 0 1';
+       bot_navigation_movemode = ((autocvar_bot_navigation_ignoreplayers) ? MOVE_NOMONSTERS : MOVE_NORMAL);
 
        //dprint("waypoint_think wpisbox = ", ftos(self.wpisbox), "\n");
        sm1 = self.origin + self.mins;
@@ -251,7 +251,7 @@ void waypoint_schedulerelink(entity wp)
        if (wp == world)
                return;
        // TODO: add some sort of visible box in edit mode for box waypoints
-       if (cvar("g_waypointeditor"))
+       if (autocvar_g_waypointeditor)
        {
                local vector m1, m2;
                m1 = wp.mins;
index 816f71b..9a36546 100644 (file)
@@ -69,8 +69,8 @@ void CampaignPreInit()
                CampaignBailout("JOLLY CHEATS AHAHAHAHAHAHAH))");
                return;
        }
-       campaign_level = cvar("_campaign_index");
-       campaign_name = strzone(cvar_string("_campaign_name"));
+       campaign_level = autocvar__campaign_index;
+       campaign_name = strzone(autocvar__campaign_name);
        campaign_index_var = strzone(strcat("g_campaign", campaign_name, "_index"));
        CampaignFile_Load(campaign_level, 2);
        if(campaign_entries < 1)
@@ -79,7 +79,7 @@ void CampaignPreInit()
                return;
        }
 
-       baseskill = cvar("g_campaign_skill");
+       baseskill = autocvar_g_campaign_skill;
        baseskill = baseskill + campaign_botskill[0];
        if(baseskill < 0)
                baseskill = 0;
@@ -101,7 +101,7 @@ void CampaignPreInit()
 
        // copy sv_gravity cvar, as the engine needs it too (sorry, this will mess
        // with the menu a little still...)
-       cvar_set_normal("sv_gravity", ftos(cvar("sv_gravity")));
+       cvar_set_normal("sv_gravity", ftos(autocvar_sv_gravity));
 
        if(Campaign_Invalid())
                return;
@@ -188,7 +188,7 @@ void CampaignPreIntermission()
 
        if(won == 1 && lost == 0 && checkrules_equality == 0 && cheatcount_total == 0)
        {
-               if(cvar("timelimit") != 0 && cvar("fraglimit") != 0 && time > cvar("timelimit") * 60) // checks if the timelimit has expired.
+               if(autocvar_timelimit != 0 && autocvar_fraglimit != 0 && time > autocvar_timelimit * 60) // checks if the timelimit has expired.
                {
                        campaign_won = 0;
                        bprint("Time's up! The current level has been LOST.\n");
@@ -201,7 +201,7 @@ void CampaignPreIntermission()
                        // sound!
                }
        }
-       else if(cvar("timelimit") != 0 && time > cvar("timelimit") * 60)
+       else if(autocvar_timelimit != 0 && time > autocvar_timelimit * 60)
        {
                campaign_won = 0;
                bprint("Time's up! The current level has been LOST.\n");
index 1bb39df..fc54d49 100644 (file)
@@ -28,7 +28,7 @@ float gamestart_sv_cheats;
 
 void CheatInit()
 {
-       gamestart_sv_cheats = cvar("sv_cheats");
+       gamestart_sv_cheats = autocvar_sv_cheats;
 }
 
 void CheatShutdown()
@@ -180,10 +180,10 @@ float CheatImpulse(float i)
                                        self.health = start_health;
                                        self.armorvalue = start_armorvalue;
                                        self.weapons |= weaponsInMap;
-                                       self.pauserotarmor_finished = time + cvar("g_balance_pause_armor_rot_spawn");
-                                       self.pauserothealth_finished = time + cvar("g_balance_pause_health_rot_spawn");
-                                       self.pauserotfuel_finished = time + cvar("g_balance_pause_fuel_rot_spawn");
-                                       self.pauseregen_finished = time + cvar("g_balance_pause_health_regen_spawn");
+                                       self.pauserotarmor_finished = time + autocvar_g_balance_pause_armor_rot_spawn;
+                                       self.pauserothealth_finished = time + autocvar_g_balance_pause_health_rot_spawn;
+                                       self.pauserotfuel_finished = time + autocvar_g_balance_pause_fuel_rot_spawn;
+                                       self.pauseregen_finished = time + autocvar_g_balance_pause_health_regen_spawn;
                                        self.strength_finished = 0;
                                        self.invincible_finished = 0;
                                }
@@ -606,7 +606,7 @@ float CheatCommand(float argc)
                        break;
                case "warp":
                        IS_CHEAT(0, argc, 0);
-                       if(argc == 2) if(cvar("g_campaign"))
+                       if(argc == 2) if(autocvar_g_campaign)
                        {
                                CampaignLevelWarp(stof(argv(1)));
                                DID_CHEAT();
index 3a41637..4309134 100644 (file)
@@ -10,7 +10,7 @@ void send_CSQC_cr_maxbullets(entity e) {
        msg_entity = e;
        WriteByte(MSG_ONE, SVC_TEMPENTITY);
        WriteByte(MSG_ONE, TE_CSQC_CR_MAXBULLETS);
-       WriteByte(MSG_ONE, cvar("g_balance_campingrifle_magazinecapacity"));
+       WriteByte(MSG_ONE, autocvar_g_balance_campingrifle_magazinecapacity);
 }
 
 void Announce(string snd) {
@@ -242,7 +242,7 @@ entity Spawn_FilterOutBadSpots(entity firstspot, entity playerlist, float mindis
        {
                spot.spawnpoint_score = Spawn_Score(spot, playerlist, teamcheck, anypoint);
 
-               if(cvar("spawn_debugview"))
+               if(autocvar_spawn_debugview)
                {
                        setmodel(spot, "models/runematch/rune.mdl");
                        if(spot.spawnpoint_score_y < mindist)
@@ -364,13 +364,13 @@ entity SelectSpawnPoint (float anypoint)
                                firstspot = firstspot_new;
                        spot = Spawn_WeightedPoint(firstspot, 1, 1, 1);
                }
-               else if (random() > cvar("g_spawn_furthest"))
+               else if (random() > autocvar_g_spawn_furthest)
                        spot = Spawn_WeightedPoint(firstspot, 1, 1, 1);
                else
                        spot = Spawn_WeightedPoint(firstspot, 1, 5000, 5); // chooses a far far away spawnpoint
        }
 
-       if(cvar("spawn_debugview"))
+       if(autocvar_spawn_debugview)
        {
                print("spot mindistance: ", vtos(spot.spawnpoint_score), "\n");
 
@@ -383,7 +383,7 @@ entity SelectSpawnPoint (float anypoint)
 
        if (!spot)
        {
-               if(cvar("spawn_debug"))
+               if(autocvar_spawn_debug)
                        GotoNextMap();
                else
                {
@@ -418,7 +418,7 @@ string CheckPlayerModel(string plyermodel) {
                return FallbackPlayerModel;
        if( substring(plyermodel,0,14) != "models/player/")
                return FallbackPlayerModel;
-       else if(cvar("sv_servermodelsonly"))
+       else if(autocvar_sv_servermodelsonly)
        {
                if(substring(plyermodel,-4,4) != ".zym")
                if(substring(plyermodel,-4,4) != ".dpm")
@@ -650,7 +650,7 @@ void PutObserverInServer (void)
        self.flags = FL_CLIENT | FL_NOTARGET;
        self.armorvalue = 666;
        self.effects = 0;
-       self.armorvalue = cvar("g_balance_armor_start");
+       self.armorvalue = autocvar_g_balance_armor_start;
        self.pauserotarmor_finished = 0;
        self.pauserothealth_finished = 0;
        self.pauseregen_finished = 0;
@@ -741,7 +741,7 @@ void FixPlayermodel()
 
        defaultmodel = "";
 
-       if(cvar("sv_defaultcharacter") == 1) {
+       if(autocvar_sv_defaultcharacter == 1) {
                defaultskin = 0;
 
                if(teams_matter)
@@ -757,8 +757,8 @@ void FixPlayermodel()
 
                if(defaultmodel == "")
                {
-                       defaultmodel = cvar_string("sv_defaultplayermodel");
-                       defaultskin = cvar("sv_defaultplayerskin");
+                       defaultmodel = autocvar_sv_defaultplayermodel;
+                       defaultskin = autocvar_sv_defaultplayerskin;
                }
        }
 
@@ -801,9 +801,9 @@ void FixPlayermodel()
                self.species = player_getspecies(); // model or skin has changed
 
        if(!teams_matter)
-               if(strlen(cvar_string("sv_defaultplayercolors")))
-                       if(self.clientcolors != stof(cvar_string("sv_defaultplayercolors")))
-                               setcolor(self, stof(cvar_string("sv_defaultplayercolors")));
+               if(strlen(autocvar_sv_defaultplayercolors))
+                       if(self.clientcolors != stof(autocvar_sv_defaultplayercolors))
+                               setcolor(self, stof(autocvar_sv_defaultplayercolors));
 }
 
 void PlayerTouchExplode(entity p1, entity p2)
@@ -883,9 +883,9 @@ void PutClientInServer (void)
                self.movetype = MOVETYPE_WALK;
                self.solid = SOLID_SLIDEBOX;
                self.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_SOLID;
-               if(cvar("g_playerclip_collisions"))
+               if(autocvar_g_playerclip_collisions)
                        self.dphitcontentsmask |= DPCONTENTS_PLAYERCLIP;
-               if(clienttype(self) == CLIENTTYPE_BOT && cvar("g_botclip_collisions"))
+               if(clienttype(self) == CLIENTTYPE_BOT && autocvar_g_botclip_collisions)
                        self.dphitcontentsmask |= DPCONTENTS_BOTCLIP;
                self.frags = FRAGS_PLAYER;
                if(independent_players)
@@ -898,11 +898,11 @@ void PutClientInServer (void)
                        self.effects = 0;
                self.air_finished = time + 12;
                self.dmg = 2;
-               if(cvar("g_balance_nex_charge"))
+               if(autocvar_g_balance_nex_charge)
                {
-                       if(cvar("g_balance_nex_secondary_chargepool"))
+                       if(autocvar_g_balance_nex_secondary_chargepool)
                                self.nex_chargepool_ammo = 1;
-                       self.nex_charge = cvar("g_balance_nex_charge_start");
+                       self.nex_charge = autocvar_g_balance_nex_charge_start;
                }
 
                if(inWarmupStage)
@@ -940,13 +940,13 @@ void PutClientInServer (void)
                self.items = start_items;
                self.jump_interval = time;
 
-               self.spawnshieldtime = time + cvar("g_spawnshieldtime");
-               self.pauserotarmor_finished = time + cvar("g_balance_pause_armor_rot_spawn");
-               self.pauserothealth_finished = time + cvar("g_balance_pause_health_rot_spawn");
-               self.pauserotfuel_finished = time + cvar("g_balance_pause_fuel_rot_spawn");
-               self.pauseregen_finished = time + cvar("g_balance_pause_health_regen_spawn");
+               self.spawnshieldtime = time + autocvar_g_spawnshieldtime;
+               self.pauserotarmor_finished = time + autocvar_g_balance_pause_armor_rot_spawn;
+               self.pauserothealth_finished = time + autocvar_g_balance_pause_health_rot_spawn;
+               self.pauserotfuel_finished = time + autocvar_g_balance_pause_fuel_rot_spawn;
+               self.pauseregen_finished = time + autocvar_g_balance_pause_health_regen_spawn;
                //extend the pause of rotting if client was reset at the beginning of the countdown
-               if(!cvar("sv_ready_restart_after_countdown") && time < game_starttime) { // TODO why is this cvar NOTted?
+               if(!autocvar_sv_ready_restart_after_countdown && time < game_starttime) { // TODO why is this cvar NOTted?
                        self.spawnshieldtime += game_starttime - time;
                        self.pauserotarmor_finished += game_starttime - time;
                        self.pauserothealth_finished += game_starttime - time;
@@ -968,7 +968,7 @@ void PutClientInServer (void)
                self.nextthink = 0;
                self.hook_time = 0;
                self.dmg_team = 0;
-               self.ballistics_density = cvar("g_ballistics_density_player");
+               self.ballistics_density = autocvar_g_ballistics_density_player;
 
                self.metertime = 0;
 
@@ -1034,16 +1034,16 @@ void PutClientInServer (void)
 
                CL_SpawnWeaponentity();
                self.alpha = default_player_alpha;
-               self.colormod = '1 1 1' * cvar("g_player_brightness");
+               self.colormod = '1 1 1' * autocvar_g_player_brightness;
                self.exteriorweaponentity.alpha = default_weapon_alpha;
 
-               self.lms_nextcheck = time + cvar("g_lms_campcheck_interval")*2;
+               self.lms_nextcheck = time + autocvar_g_lms_campcheck_interval*2;
                self.lms_traveled_distance = 0;
                self.speedrunning = FALSE;
 
                race_PostSpawn(spot);
 
-               if(cvar("spawn_debug"))
+               if(autocvar_spawn_debug)
                {
                        sprint(self, strcat("spawnpoint origin:  ", vtos(spot.origin), "\n"));
                        remove(spot);   // usefull for checking if there are spawnpoints, that let drop through the floor
@@ -1052,7 +1052,7 @@ void PutClientInServer (void)
                //stuffcmd(self, "chase_active 0");
                //stuffcmd(self, "set viewsize $tmpviewsize \n");
 
-               if (cvar("g_spawnsound"))
+               if (autocvar_g_spawnsound)
                        sound (self, CHAN_TRIGGER, "misc/spawn.wav", VOL_BASE, ATTN_NORM);
 
                if(g_assault) {
@@ -1120,8 +1120,8 @@ float ClientInit_SendEntity(entity to, float sf)
        WriteCoord(MSG_ENTITY, self.bouncestop); // g_balance_grenadelauncher_bouncestop
        WriteCoord(MSG_ENTITY, self.ebouncefactor); // g_balance_grenadelauncher_bouncefactor
        WriteCoord(MSG_ENTITY, self.ebouncestop); // g_balance_grenadelauncher_bouncestop
-       WriteByte(MSG_ENTITY, cvar("g_balance_nex_secondary")); // client has to know if it should zoom or not
-       WriteByte(MSG_ENTITY, cvar("g_balance_campingrifle_secondary")); // client has to know if it should zoom or not
+       WriteByte(MSG_ENTITY, autocvar_g_balance_nex_secondary); // client has to know if it should zoom or not
+       WriteByte(MSG_ENTITY, autocvar_g_balance_campingrifle_secondary); // client has to know if it should zoom or not
        WriteByte(MSG_ENTITY, serverflags); // client has to know if it should zoom or not
        return TRUE;
 }
@@ -1129,34 +1129,34 @@ float ClientInit_SendEntity(entity to, float sf)
 void ClientInit_CheckUpdate()
 {
        self.nextthink = time;
-       if(self.count != cvar("g_balance_armor_blockpercent"))
+       if(self.count != autocvar_g_balance_armor_blockpercent)
        {
-               self.count = cvar("g_balance_armor_blockpercent");
+               self.count = autocvar_g_balance_armor_blockpercent;
                self.SendFlags |= 1;
        }
-       if(self.cnt != cvar("g_balance_weaponswitchdelay"))
+       if(self.cnt != autocvar_g_balance_weaponswitchdelay)
        {
-               self.cnt = cvar("g_balance_weaponswitchdelay");
+               self.cnt = autocvar_g_balance_weaponswitchdelay;
                self.SendFlags |= 1;
        }
-       if(self.bouncefactor != cvar("g_balance_grenadelauncher_bouncefactor"))
+       if(self.bouncefactor != autocvar_g_balance_grenadelauncher_bouncefactor)
        {
-               self.bouncefactor = cvar("g_balance_grenadelauncher_bouncefactor");
+               self.bouncefactor = autocvar_g_balance_grenadelauncher_bouncefactor;
                self.SendFlags |= 1;
        }
-       if(self.bouncestop != cvar("g_balance_grenadelauncher_bouncestop"))
+       if(self.bouncestop != autocvar_g_balance_grenadelauncher_bouncestop)
        {
-               self.bouncestop = cvar("g_balance_grenadelauncher_bouncestop");
+               self.bouncestop = autocvar_g_balance_grenadelauncher_bouncestop;
                self.SendFlags |= 1;
        }
-       if(self.ebouncefactor != cvar("g_balance_electro_secondary_bouncefactor"))
+       if(self.ebouncefactor != autocvar_g_balance_electro_secondary_bouncefactor)
        {
-               self.ebouncefactor = cvar("g_balance_electro_secondary_bouncefactor");
+               self.ebouncefactor = autocvar_g_balance_electro_secondary_bouncefactor;
                self.SendFlags |= 1;
        }
-       if(self.ebouncestop != cvar("g_balance_electro_secondary_bouncestop"))
+       if(self.ebouncestop != autocvar_g_balance_electro_secondary_bouncestop)
        {
-               self.ebouncestop = cvar("g_balance_electro_secondary_bouncestop");
+               self.ebouncestop = autocvar_g_balance_electro_secondary_bouncestop;
                self.SendFlags |= 1;
        }
 }
@@ -1290,7 +1290,7 @@ void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto
 {
        float killtime;
        entity e;
-       killtime = cvar("g_balance_kill_delay");
+       killtime = autocvar_g_balance_kill_delay;
 
        if(g_race_qualifying)
                killtime = 0;
@@ -1426,25 +1426,25 @@ void FixClientCvars(entity e)
        stuffcmd(e, "\nin_bindmap 0 0\n");
        if(g_race || g_cts)
                stuffcmd(e, "cl_cmd settemp cl_movecliptokeyboard 2\n");
-       if(cvar("g_antilag") == 3) // client side hitscan
+       if(autocvar_g_antilag == 3) // client side hitscan
                stuffcmd(e, "cl_cmd settemp cl_prydoncursor_notrace 0\n");
        if(sv_gentle)
                stuffcmd(e, "cl_cmd settemp cl_gentle 1\n");
        /*
         * we no longer need to stuff this. Remove this comment block if you feel
         * 2.3 and higher (or was it 2.2.3?) don't need these any more
-       stuffcmd(e, strcat("cl_gravity ", ftos(cvar("sv_gravity")), "\n"));
-       stuffcmd(e, strcat("cl_movement_accelerate ", ftos(cvar("sv_accelerate")), "\n"));
-       stuffcmd(e, strcat("cl_movement_friction ", ftos(cvar("sv_friction")), "\n"));
-       stuffcmd(e, strcat("cl_movement_maxspeed ", ftos(cvar("sv_maxspeed")), "\n"));
-       stuffcmd(e, strcat("cl_movement_airaccelerate ", ftos(cvar("sv_airaccelerate")), "\n"));
-       stuffcmd(e, strcat("cl_movement_maxairspeed ", ftos(cvar("sv_maxairspeed")), "\n"));
-       stuffcmd(e, strcat("cl_movement_stopspeed ", ftos(cvar("sv_stopspeed")), "\n"));
-       stuffcmd(e, strcat("cl_movement_jumpvelocity ", ftos(cvar("sv_jumpvelocity")), "\n"));
-       stuffcmd(e, strcat("cl_movement_stepheight ", ftos(cvar("sv_stepheight")), "\n"));
-       stuffcmd(e, strcat("set cl_movement_friction_on_land ", ftos(cvar("sv_friction_on_land")), "\n"));
-       stuffcmd(e, strcat("set cl_movement_airaccel_qw ", ftos(cvar("sv_airaccel_qw")), "\n"));
-       stuffcmd(e, strcat("set cl_movement_airaccel_sideways_friction ", ftos(cvar("sv_airaccel_sideways_friction")), "\n"));
+       stuffcmd(e, strcat("cl_gravity ", ftos(autocvar_sv_gravity), "\n"));
+       stuffcmd(e, strcat("cl_movement_accelerate ", ftos(autocvar_sv_accelerate), "\n"));
+       stuffcmd(e, strcat("cl_movement_friction ", ftos(autocvar_sv_friction), "\n"));
+       stuffcmd(e, strcat("cl_movement_maxspeed ", ftos(autocvar_sv_maxspeed), "\n"));
+       stuffcmd(e, strcat("cl_movement_airaccelerate ", ftos(autocvar_sv_airaccelerate), "\n"));
+       stuffcmd(e, strcat("cl_movement_maxairspeed ", ftos(autocvar_sv_maxairspeed), "\n"));
+       stuffcmd(e, strcat("cl_movement_stopspeed ", ftos(autocvar_sv_stopspeed), "\n"));
+       stuffcmd(e, strcat("cl_movement_jumpvelocity ", ftos(autocvar_sv_jumpvelocity), "\n"));
+       stuffcmd(e, strcat("cl_movement_stepheight ", ftos(autocvar_sv_stepheight), "\n"));
+       stuffcmd(e, strcat("set cl_movement_friction_on_land ", ftos(autocvar_sv_friction_on_land), "\n"));
+       stuffcmd(e, strcat("set cl_movement_airaccel_qw ", ftos(autocvar_sv_airaccel_qw), "\n"));
+       stuffcmd(e, strcat("set cl_movement_airaccel_sideways_friction ", ftos(autocvar_sv_airaccel_sideways_friction), "\n"));
        stuffcmd(e, "cl_movement_edgefriction 1\n");
         */
 }
@@ -1527,25 +1527,25 @@ void ClientConnect (void)
        //      dom_player_join_team(self);
 
        // identify the right forced team
-       if(PlayerInIDList(self, cvar_string("g_forced_team_red")))
+       if(PlayerInIDList(self, autocvar_g_forced_team_red))
                self.team_forced = COLOR_TEAM1;
-       else if(PlayerInIDList(self, cvar_string("g_forced_team_blue")))
+       else if(PlayerInIDList(self, autocvar_g_forced_team_blue))
                self.team_forced = COLOR_TEAM2;
-       else if(PlayerInIDList(self, cvar_string("g_forced_team_yellow")))
+       else if(PlayerInIDList(self, autocvar_g_forced_team_yellow))
                self.team_forced = COLOR_TEAM3;
-       else if(PlayerInIDList(self, cvar_string("g_forced_team_pink")))
+       else if(PlayerInIDList(self, autocvar_g_forced_team_pink))
                self.team_forced = COLOR_TEAM4;
-       else if(cvar_string("g_forced_team_otherwise") == "red")
+       else if(autocvar_g_forced_team_otherwise == "red")
                self.team_forced = COLOR_TEAM1;
-       else if(cvar_string("g_forced_team_otherwise") == "blue")
+       else if(autocvar_g_forced_team_otherwise == "blue")
                self.team_forced = COLOR_TEAM2;
-       else if(cvar_string("g_forced_team_otherwise") == "yellow")
+       else if(autocvar_g_forced_team_otherwise == "yellow")
                self.team_forced = COLOR_TEAM3;
-       else if(cvar_string("g_forced_team_otherwise") == "pink")
+       else if(autocvar_g_forced_team_otherwise == "pink")
                self.team_forced = COLOR_TEAM4;
-       else if(cvar_string("g_forced_team_otherwise") == "spectate")
+       else if(autocvar_g_forced_team_otherwise == "spectate")
                self.team_forced = -1;
-       else if(cvar_string("g_forced_team_otherwise") == "spectator")
+       else if(autocvar_g_forced_team_otherwise == "spectator")
                self.team_forced = -1;
        else
                self.team_forced = 0;
@@ -1556,12 +1556,12 @@ void ClientConnect (void)
 
        JoinBestTeam(self, FALSE, FALSE); // if the team number is valid, keep it
 
-       if((cvar("sv_spectate") == 1 && !g_lms) || cvar("g_campaign") || self.team_forced < 0) {
+       if((autocvar_sv_spectate == 1 && !g_lms) || autocvar_g_campaign || self.team_forced < 0) {
                self.classname = "observer";
        } else {
                if(teams_matter)
                {
-                       if(cvar("g_balance_teams") || cvar("g_balance_teams_force"))
+                       if(autocvar_g_balance_teams || autocvar_g_balance_teams_force)
                        {
                                self.classname = "player";
                                campaign_bots_may_start = 1;
@@ -1580,7 +1580,7 @@ void ClientConnect (void)
 
        self.playerid = (playerid_last = playerid_last + 1);
 
-       if(cvar("sv_eventlog"))
+       if(autocvar_sv_eventlog)
                GameLogEcho(strcat(":join:", ftos(self.playerid), ":", ftos(num_for_edict(self)), ":", ((clienttype(self) == CLIENTTYPE_REAL) ? self.netaddress : "bot"), ":", self.netname));
 
        LogTeamchange(self.playerid, self.team, 1);
@@ -1650,15 +1650,15 @@ void ClientConnect (void)
        self.spectatortime = time;
        if(blockSpectators)
        {
-               sprint(self, strcat("^7You have to become a player within the next ", ftos(cvar("g_maxplayers_spectator_blocktime")), " seconds, otherwise you will be kicked, because spectators aren't allowed at this time!\n"));
+               sprint(self, strcat("^7You have to become a player within the next ", ftos(autocvar_g_maxplayers_spectator_blocktime), " seconds, otherwise you will be kicked, because spectators aren't allowed at this time!\n"));
        }
 
        self.jointime = time;
-       self.allowedTimeouts = cvar("sv_timeout_number");
+       self.allowedTimeouts = autocvar_sv_timeout_number;
 
        if(clienttype(self) == CLIENTTYPE_REAL)
        {
-               if(cvar("g_bugrigs") || g_weaponarena == WEPBIT_TUBA)
+               if(autocvar_g_bugrigs || g_weaponarena == WEPBIT_TUBA)
                        stuffcmd(self, "cl_cmd settemp chase_active 1\n");
        }
 
@@ -1676,7 +1676,7 @@ void ClientConnect (void)
 
        SoundEntity_Attach(self);
 
-       if(cvar("g_hitplots") || strstrofs(strcat(" ", cvar_string("g_hitplots_individuals"), " "), strcat(" ", self.netaddress, " "), 0) >= 0)
+       if(autocvar_g_hitplots || strstrofs(strcat(" ", autocvar_g_hitplots_individuals, " "), strcat(" ", self.netaddress, " "), 0) >= 0)
        {
                self.hitplotfh = fopen(strcat("hits-", matchid, "-", self.netaddress, "-", ftos(self.playerid), ".plot"), FILE_WRITE);
                fputs(self.hitplotfh, strcat("#name ", self.netname, "\n"));
@@ -1705,7 +1705,7 @@ void ClientConnect (void)
                        race_SendRankings(i, 0, 0, MSG_ONE);
                }
        }
-       else if(cvar("sv_teamnagger") && !(cvar("bot_vs_human") && (c3==-1 && c4==-1)) && !g_ca) // teamnagger is currently bad for ca
+       else if(autocvar_sv_teamnagger && !(autocvar_bot_vs_human && (c3==-1 && c4==-1)) && !g_ca) // teamnagger is currently bad for ca
                send_CSQC_teamnagger();
 
        send_CSQC_cr_maxbullets(self);
@@ -1753,7 +1753,7 @@ void ClientDisconnect (void)
        if(self.entcs)
                detach_entcs();
 
-       if(cvar("sv_eventlog"))
+       if(autocvar_sv_eventlog)
                GameLogEcho(strcat(":part:", ftos(self.playerid)));
        bprint ("^4",self.netname);
        bprint ("^4 disconnected\n");
@@ -1925,19 +1925,19 @@ void UpdateTeamBubble()
 .float oldcolormap;
 void respawn(void)
 {
-       if(self.modelindex != 0 && cvar("g_respawn_ghosts"))
+       if(self.modelindex != 0 && autocvar_g_respawn_ghosts)
        {
                self.solid = SOLID_NOT;
                self.takedamage = DAMAGE_NO;
                self.movetype = MOVETYPE_FLY;
-               self.velocity = '0 0 1' * cvar("g_respawn_ghosts_speed");
-               self.avelocity = randomvec() * cvar("g_respawn_ghosts_speed") * 3 - randomvec() * cvar("g_respawn_ghosts_speed") * 3;
+               self.velocity = '0 0 1' * autocvar_g_respawn_ghosts_speed;
+               self.avelocity = randomvec() * autocvar_g_respawn_ghosts_speed * 3 - randomvec() * autocvar_g_respawn_ghosts_speed * 3;
                self.effects |= EF_ADDITIVE;
                self.oldcolormap = self.colormap;
                self.colormap = 512;
                pointparticles(particleeffectnum("respawn_ghost"), self.origin, '0 0 0', 1);
-               if(cvar("g_respawn_ghosts_maxtime"))
-                       SUB_SetFade (self, time + cvar("g_respawn_ghosts_maxtime") / 2 + random () * (cvar("g_respawn_ghosts_maxtime") - cvar("g_respawn_ghosts_maxtime") / 2), 1.5);
+               if(autocvar_g_respawn_ghosts_maxtime)
+                       SUB_SetFade (self, time + autocvar_g_respawn_ghosts_maxtime / 2 + random () * (autocvar_g_respawn_ghosts_maxtime - autocvar_g_respawn_ghosts_maxtime / 2), 1.5);
        }
 
        CopyBody(1);
@@ -1965,7 +1965,7 @@ void play_countdown(float finished, string samp)
  * @param addOneSecond boolean, set to 1 if the welcome-message centerprint asks for the text
  */
 string getTimeoutText(float addOneSecond) {
-       if (!cvar("sv_timeout") || !timeoutStatus)
+       if (!autocvar_sv_timeout || !timeoutStatus)
                return "";
 
        local string retStr;
@@ -2006,7 +2006,7 @@ void player_powerups (void)
        
        if((self.items & IT_USING_JETPACK) && !self.deadflag)
        {
-               SoundEntity_StartSound(self, CHAN_PLAYER, "misc/jetpack_fly.wav", VOL_BASE, cvar("g_jetpack_attenuation"));
+               SoundEntity_StartSound(self, CHAN_PLAYER, "misc/jetpack_fly.wav", VOL_BASE, autocvar_g_jetpack_attenuation);
                self.modelflags |= MF_ROCKET;
        }
        else
@@ -2052,7 +2052,7 @@ void player_powerups (void)
                if (self.items & IT_INVINCIBLE)
                {
                        play_countdown(self.invincible_finished, "misc/poweroff.wav");
-                       if (time > self.invincible_finished && cvar("g_balance_powerup_timer"))
+                       if (time > self.invincible_finished && autocvar_g_balance_powerup_timer)
                        {
                                self.items = self.items - (self.items & IT_INVINCIBLE);
                                sprint(self, "^3Speed has worn off\n");
@@ -2073,7 +2073,7 @@ void player_powerups (void)
                {
                        play_countdown(self.strength_finished, "misc/poweroff.wav");
                        self.effects = self.effects | (EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT);
-                       if (time > self.strength_finished && cvar("g_balance_powerup_timer"))
+                       if (time > self.strength_finished && autocvar_g_balance_powerup_timer)
                        {
                                self.items = self.items - (self.items & IT_STRENGTH);
                                sprint(self, "^3Strength has worn off\n");
@@ -2091,7 +2091,7 @@ void player_powerups (void)
                {
                        play_countdown(self.invincible_finished, "misc/poweroff.wav");
                        self.effects = self.effects | (EF_RED | EF_ADDITIVE | EF_FULLBRIGHT);
-                       if (time > self.invincible_finished && cvar("g_balance_powerup_timer"))
+                       if (time > self.invincible_finished && autocvar_g_balance_powerup_timer)
                        {
                                self.items = self.items - (self.items & IT_INVINCIBLE);
                                sprint(self, "^3Shield has worn off\n");
@@ -2106,10 +2106,10 @@ void player_powerups (void)
                        }
                }
 
-               if(cvar("g_nodepthtestplayers"))
+               if(autocvar_g_nodepthtestplayers)
                        self.effects = self.effects | EF_NODEPTHTEST;
 
-               if(cvar("g_fullbrightplayers"))
+               if(autocvar_g_fullbrightplayers)
                        self.effects = self.effects | EF_FULLBRIGHT;
 
                // midair gamemode: damage only while in the air
@@ -2119,7 +2119,7 @@ void player_powerups (void)
                // remaining hits in the same frame)
                if (self.flags & FL_ONGROUND)
                if (g_midair)
-                       self.spawnshieldtime = max(self.spawnshieldtime, time + cvar("g_midair_shieldtime"));
+                       self.spawnshieldtime = max(self.spawnshieldtime, time + autocvar_g_midair_shieldtime);
 
                if (time >= game_starttime)
                if (time < self.spawnshieldtime)
@@ -2177,15 +2177,15 @@ float CalcRotRegen(float current, float regenstable, float regenfactor, float re
 void player_regen (void)
 {
        float minh, mina, minf, maxh, maxa, maxf, limith, limita, limitf, max_mod, regen_mod, rot_mod, limit_mod;
-       maxh = cvar("g_balance_health_rotstable");
-       maxa = cvar("g_balance_armor_rotstable");
-       maxf = cvar("g_balance_fuel_rotstable");
-       minh = cvar("g_balance_health_regenstable");
-       mina = cvar("g_balance_armor_regenstable");
-       minf = cvar("g_balance_fuel_regenstable");
-       limith = cvar("g_balance_health_limit");
-       limita = cvar("g_balance_armor_limit");
-       limitf = cvar("g_balance_fuel_limit");
+       maxh = autocvar_g_balance_health_rotstable;
+       maxa = autocvar_g_balance_armor_rotstable;
+       maxf = autocvar_g_balance_fuel_rotstable;
+       minh = autocvar_g_balance_health_regenstable;
+       mina = autocvar_g_balance_armor_regenstable;
+       minf = autocvar_g_balance_fuel_regenstable;
+       limith = autocvar_g_balance_health_limit;
+       limita = autocvar_g_balance_armor_limit;
+       limitf = autocvar_g_balance_fuel_limit;
 
        max_mod = regen_mod = rot_mod = limit_mod = 1;
 
@@ -2193,27 +2193,27 @@ void player_regen (void)
        {
                if (self.runes & CURSE_VENOM) // do we have both rune/curse?
                {
-                       regen_mod = cvar("g_balance_rune_regen_combo_regenrate");
-                       max_mod = cvar("g_balance_rune_regen_combo_hpmod");
-                       limit_mod = cvar("g_balance_rune_regen_combo_limitmod");
+                       regen_mod = autocvar_g_balance_rune_regen_combo_regenrate;
+                       max_mod = autocvar_g_balance_rune_regen_combo_hpmod;
+                       limit_mod = autocvar_g_balance_rune_regen_combo_limitmod;
                }
                else
                {
-                       regen_mod = cvar("g_balance_rune_regen_regenrate");
-                       max_mod = cvar("g_balance_rune_regen_hpmod");
-                       limit_mod = cvar("g_balance_rune_regen_limitmod");
+                       regen_mod = autocvar_g_balance_rune_regen_regenrate;
+                       max_mod = autocvar_g_balance_rune_regen_hpmod;
+                       limit_mod = autocvar_g_balance_rune_regen_limitmod;
                }
        }
        else if (self.runes & CURSE_VENOM)
        {
-               max_mod = cvar("g_balance_curse_venom_hpmod");
+               max_mod = autocvar_g_balance_curse_venom_hpmod;
                if (self.runes & RUNE_REGEN) // do we have both rune/curse?
-                       rot_mod = cvar("g_balance_rune_regen_combo_rotrate");
+                       rot_mod = autocvar_g_balance_rune_regen_combo_rotrate;
                else
-                       rot_mod = cvar("g_balance_curse_venom_rotrate");
-               limit_mod = cvar("g_balance_curse_venom_limitmod");
+                       rot_mod = autocvar_g_balance_curse_venom_rotrate;
+               limit_mod = autocvar_g_balance_curse_venom_limitmod;
                //if (!self.runes & RUNE_REGEN)
-               //      rot_mod = cvar("g_balance_curse_venom_rotrate");
+               //      rot_mod = autocvar_g_balance_curse_venom_rotrate;
        }
        maxh = maxh * max_mod;
        //maxa = maxa * max_mod;
@@ -2228,10 +2228,10 @@ void player_regen (void)
        if(g_lms && g_ca)
                rot_mod = 0;
 
-       if (!g_minstagib && !g_ca && (!g_lms || cvar("g_lms_regenerate")))
+       if (!g_minstagib && !g_ca && (!g_lms || autocvar_g_lms_regenerate))
        {
-               self.armorvalue = CalcRotRegen(self.armorvalue, mina, cvar("g_balance_armor_regen"), cvar("g_balance_armor_regenlinear"), regen_mod * frametime * (time > self.pauseregen_finished), maxa, cvar("g_balance_armor_rot"), cvar("g_balance_armor_rotlinear"), rot_mod * frametime * (time > self.pauserotarmor_finished), limita);
-               self.health = CalcRotRegen(self.health, minh, cvar("g_balance_health_regen"), cvar("g_balance_health_regenlinear"), regen_mod * frametime * (time > self.pauseregen_finished), maxh, cvar("g_balance_health_rot"), cvar("g_balance_health_rotlinear"), rot_mod * frametime * (time > self.pauserothealth_finished), limith);
+               self.armorvalue = CalcRotRegen(self.armorvalue, mina, autocvar_g_balance_armor_regen, autocvar_g_balance_armor_regenlinear, regen_mod * frametime * (time > self.pauseregen_finished), maxa, autocvar_g_balance_armor_rot, autocvar_g_balance_armor_rotlinear, rot_mod * frametime * (time > self.pauserotarmor_finished), limita);
+               self.health = CalcRotRegen(self.health, minh, autocvar_g_balance_health_regen, autocvar_g_balance_health_regenlinear, regen_mod * frametime * (time > self.pauseregen_finished), maxh, autocvar_g_balance_health_rot, autocvar_g_balance_health_rotlinear, rot_mod * frametime * (time > self.pauserothealth_finished), limith);
 
                // if player rotted to death...  die!
                if(self.health < 1)
@@ -2239,7 +2239,7 @@ void player_regen (void)
        }
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
-               self.ammo_fuel = CalcRotRegen(self.ammo_fuel, minf, cvar("g_balance_fuel_regen"), cvar("g_balance_fuel_regenlinear"), regen_mod * frametime * (time > self.pauseregen_finished) * (self.items & IT_FUEL_REGEN != 0), maxf, cvar("g_balance_fuel_rot"), cvar("g_balance_fuel_rotlinear"), rot_mod * frametime * (time > self.pauserotfuel_finished), limitf);
+               self.ammo_fuel = CalcRotRegen(self.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, regen_mod * frametime * (time > self.pauseregen_finished) * (self.items & IT_FUEL_REGEN != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, rot_mod * frametime * (time > self.pauserotfuel_finished), limitf);
 }
 
 float zoomstate_set;
@@ -2411,13 +2411,13 @@ void ShowRespawnCountdown()
 void LeaveSpectatorMode()
 {
        if(isJoinAllowed()) {
-               if(!teams_matter || cvar("g_campaign") || cvar("g_balance_teams") || (self.wasplayer && cvar("g_changeteam_banned")) || self.team_forced > 0) {
+               if(!teams_matter || autocvar_g_campaign || autocvar_g_balance_teams || (self.wasplayer && autocvar_g_changeteam_banned) || self.team_forced > 0) {
                        self.classname = "player";
 
-                       if(cvar("g_campaign") || cvar("g_balance_teams") || cvar("g_balance_teams_force"))
+                       if(autocvar_g_campaign || autocvar_g_balance_teams || autocvar_g_balance_teams_force)
                                JoinBestTeam(self, FALSE, TRUE);
 
-                       if(cvar("g_campaign"))
+                       if(autocvar_g_campaign)
                                campaign_bots_may_start = 1;
 
                        PutClientInServer();
@@ -2425,7 +2425,7 @@ void LeaveSpectatorMode()
                        if(self.classname == "player")
                                bprint ("^4", self.netname, "^4 is playing now\n");
 
-                       if(!cvar("g_campaign"))
+                       if(!autocvar_g_campaign)
                                centerprint(self,""); // clear MOTD
 
                        return;
@@ -2453,7 +2453,7 @@ float isJoinAllowed() {
        if(self.team_forced < 0)
                return FALSE; // forced spectators can never join
 
-       if (!cvar("g_maxplayers"))
+       if (!autocvar_g_maxplayers)
                return TRUE;
 
        local entity e;
@@ -2462,7 +2462,7 @@ float isJoinAllowed() {
                if(e.classname == "player")
                        currentlyPlaying += 1;
        }
-       if(currentlyPlaying < cvar("g_maxplayers"))
+       if(currentlyPlaying < autocvar_g_maxplayers)
                return TRUE;
 
        return FALSE;
@@ -2474,7 +2474,7 @@ float isJoinAllowed() {
  */
 void checkSpectatorBlock() {
        if(self.classname == "spectator" || self.classname == "observer") {
-               if( time > (self.spectatortime + cvar("g_maxplayers_spectator_blocktime")) ) {
+               if( time > (self.spectatortime + autocvar_g_maxplayers_spectator_blocktime) ) {
                        sprint(self, "^7You were kicked from the server because you are spectator and spectators aren't allowed at the moment.\n");
                        dropclient(self);
                }
@@ -2565,8 +2565,8 @@ void() nexball_setstatus;
 void PlayerPreThink (void)
 {
        self.stat_game_starttime = game_starttime;
-       self.stat_allow_oldnexbeam = cvar("g_allow_oldnexbeam");
-       self.stat_leadlimit = cvar("leadlimit");
+       self.stat_allow_oldnexbeam = autocvar_g_allow_oldnexbeam;
+       self.stat_leadlimit = autocvar_leadlimit;
 
        if(frametime)
        {
@@ -2582,7 +2582,7 @@ void PlayerPreThink (void)
 
        if(self.netname_previous != self.netname)
        {
-               if(cvar("sv_eventlog"))
+               if(autocvar_sv_eventlog)
                        GameLogEcho(strcat(":name:", ftos(self.playerid), ":", self.netname));
                if(self.netname_previous)
                        strunzone(self.netname_previous);
@@ -2596,24 +2596,24 @@ void PlayerPreThink (void)
                        {
                                if(strstr(self.cvar_g_xonoticversion, "git", 0) < 0)
                                {
-                                       if(strstr(cvar_string("g_xonoticversion"), "git", 0) >= 0)
+                                       if(strstr(autocvar_g_xonoticversion, "git", 0) >= 0)
                                        {
-                                               dprint("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", cvar_string("g_xonoticversion"), " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
-                                               sprint(self, strcat("\{1}^1NOTE: ^7the server is running ^3Xonotic ", cvar_string("g_xonoticversion"), " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n"));
+                                               dprint("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", autocvar_g_xonoticversion, " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
+                                               sprint(self, strcat("\{1}^1NOTE: ^7the server is running ^3Xonotic ", autocvar_g_xonoticversion, " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n"));
                                        }
                                        else
                                        {
                                                float r;
-                                               r = vercmp(self.cvar_g_xonoticversion, cvar_string("g_xonoticversion"));
+                                               r = vercmp(self.cvar_g_xonoticversion, autocvar_g_xonoticversion);
                                                if(r < 0)
                                                {
-                                                       dprint("^1NOTE^7 to ", self.netname, "^7 - ^3Xonotic ", cvar_string("g_xonoticversion"), "^7 is out, and you still have ^3Xonotic ", self.cvar_g_xonoticversion, "^1 - get the update from ^4http://www.xonotic.com/^1!\n");
-                                                       sprint(self, strcat("\{1}^1NOTE: ^3Xonotic ", cvar_string("g_xonoticversion"), "^7 is out, and you still have ^3Xonotic ", self.cvar_g_xonoticversion, "^1 - get the update from ^4http://www.xonotic.com/^1!\n"));
+                                                       dprint("^1NOTE^7 to ", self.netname, "^7 - ^3Xonotic ", autocvar_g_xonoticversion, "^7 is out, and you still have ^3Xonotic ", self.cvar_g_xonoticversion, "^1 - get the update from ^4http://www.xonotic.com/^1!\n");
+                                                       sprint(self, strcat("\{1}^1NOTE: ^3Xonotic ", autocvar_g_xonoticversion, "^7 is out, and you still have ^3Xonotic ", self.cvar_g_xonoticversion, "^1 - get the update from ^4http://www.xonotic.com/^1!\n"));
                                                }
                                                else if(r > 0)
                                                {
-                                                       dprint("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", cvar_string("g_xonoticversion"), "^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
-                                                       sprint(self, strcat("\{1}^1NOTE: ^7the server is running ^3Xonotic ", cvar_string("g_xonoticversion"), "^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n"));
+                                                       dprint("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", autocvar_g_xonoticversion, "^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
+                                                       sprint(self, strcat("\{1}^1NOTE: ^7the server is running ^3Xonotic ", autocvar_g_xonoticversion, "^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n"));
                                                }
                                        }
                                }
@@ -2667,18 +2667,18 @@ void PlayerPreThink (void)
 
                if(frametime)
                {
-                       if(self.health <= 0 && cvar("g_deathglow"))
+                       if(self.health <= 0 && autocvar_g_deathglow)
                        {
                                if(self.glowmod_x > 0)
-                                       self.glowmod_x -= cvar("g_deathglow") * frametime;
+                                       self.glowmod_x -= autocvar_g_deathglow * frametime;
                                else
                                        self.glowmod_x = -1;
                                if(self.glowmod_y > 0)
-                                       self.glowmod_y -= cvar("g_deathglow") * frametime;
+                                       self.glowmod_y -= autocvar_g_deathglow * frametime;
                                else
                                        self.glowmod_y = -1;
                                if(self.glowmod_z > 0)
-                                       self.glowmod_z -= cvar("g_deathglow") * frametime;
+                                       self.glowmod_z -= autocvar_g_deathglow * frametime;
                                else
                                        self.glowmod_z = -1;
                        }
@@ -2704,7 +2704,7 @@ void PlayerPreThink (void)
                                if(frametime)
                                        player_anim();
                                button_pressed = (self.BUTTON_ATCK || self.BUTTON_JUMP || self.BUTTON_ATCK2 || self.BUTTON_HOOK || self.BUTTON_USE);
-                               force_respawn = (g_lms || (g_ca) || cvar("g_forced_respawn"));
+                               force_respawn = (g_lms || (g_ca) || autocvar_g_forced_respawn);
                                if (self.deadflag == DEAD_DYING)
                                {
                                        if(force_respawn)