]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qc
Merge remote-tracking branch 'origin/master' into samual/weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qc
index e7e771dc6ed03a26ff89f050aa1499ff2fc835ad..33d43cbc23876c9990834e1391c2c72ec0381033 100644 (file)
@@ -458,7 +458,6 @@ void GetCvars_handleFloatOnce(string thisname, float f, .float field, string nam
                        stuffcmd(self, strcat("cl_cmd sendcvar ", name, "\n"));
        }
 }
-float w_getbestweapon(entity e);
 string W_FixWeaponOrder_ForceComplete_AndBuildImpulseList(string wo)
 {
        string o;
@@ -643,7 +642,7 @@ float want_weapon(string cvarprefix, entity weaponinfo, float allguns)
                        d = FALSE;
        }
        else if (g_cts)
-               d = (i == WEP_SHOTGUN);
+               d = (i == WEP_SHOTGUN); // todo: how to handle shotgun in CTS mode? we're removing it.. so.... 
        else if (g_nexball)
                d = 0; // weapon is set a few lines later
        else
@@ -866,7 +865,7 @@ void readplayerstartcvars()
        {
                e = get_weaponinfo(i);
                if(precache_weapons & WepSet_FromWeapon(i))
-                       weapon_action(i, WR_PRECACHE);
+                       WEP_ACTION(i, WR_INIT);
        }
 
        start_ammo_shells = max(0, start_ammo_shells);
@@ -1389,18 +1388,6 @@ void precache()
         precache_sound ("weapons/hook_impact.wav"); // hook
     }
 
-    if(autocvar_sv_precacheweapons)
-    {
-        //precache weapon models/sounds
-        float wep;
-        wep = WEP_FIRST;
-        while (wep <= WEP_LAST)
-        {
-            weapon_action(wep, WR_PRECACHE);
-            wep = wep + 1;
-        }
-    }
-
     precache_model("models/elaser.mdl");
     precache_model("models/laser.mdl");
     precache_model("models/ebomb.mdl");