]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/weaponsystem.qc
Replace some of the remaining cvar globals with autocvars, allows changing a few...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / weaponsystem.qc
index 7638813882d306ca3e67544c10290ed80231d866..487154fe36009147d099934de0fd30363517e66f 100644 (file)
@@ -31,8 +31,8 @@
 float W_WeaponRateFactor(entity this)
 {
        float t = 1;
-       if(g_weaponratefactor > 0)
-               t = 1.0 / g_weaponratefactor;
+       if(autocvar_g_weaponratefactor > 0)
+               t = 1.0 / autocvar_g_weaponratefactor;
 
        MUTATOR_CALLHOOK(WeaponRateFactor, t, this);
        t = M_ARGV(0, float);
@@ -42,7 +42,7 @@ float W_WeaponRateFactor(entity this)
 
 float W_WeaponSpeedFactor(entity this)
 {
-       float t = 1.0 * g_weaponspeedfactor;
+       float t = 1.0 * autocvar_g_weaponspeedfactor;
 
        MUTATOR_CALLHOOK(WeaponSpeedFactor, t, this);
        t = M_ARGV(0, float);
@@ -409,7 +409,7 @@ void weapon_thinkf(entity actor, .entity weaponentity, WFRAME fr, float t, void(
        {
                FOREACH_CLIENT(true, {
                        if(it == actor || (IS_SPEC(it) && it.enemy == actor))
-                               wframe_send(it, this, fr, g_weaponratefactor, restartanim);
+                               wframe_send(it, this, fr, autocvar_g_weaponratefactor, restartanim);
                });
        }