]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qc
simplify
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qc
index 28f86af2f0dc54ceb2ee9ab4286f8cf021609b07..a2f4201019a46e19c1b45b78dc8c5d0f38a88a41 100644 (file)
@@ -880,8 +880,6 @@ float want_weapon(string cvarprefix, entity weaponinfo, float allguns)
                        t = (weaponinfo.spawnflags & WEP_FLAG_NORMAL);
                else if(t < -1)
                        t = 0;
-               else if (g_race)
-                       t = (i == WEP_LASER || i == WEP_SHOTGUN);
                else if (g_cts)
                        t = (i == WEP_SHOTGUN);
                else if (g_nexball)
@@ -1166,6 +1164,7 @@ float sv_pitch_min;
 float sv_pitch_max;
 float sv_pitch_fixyaw;
 
+string GetGametype(); // g_world.qc
 void readlevelcvars(void)
 {
        // first load all the mutators
@@ -1301,7 +1300,9 @@ void readlevelcvars(void)
 
        g_pinata = cvar("g_pinata");
 
-       g_weapon_stay = cvar("g_weapon_stay");
+    g_weapon_stay = cvar(strcat("g_", GetGametype(), "_weapon_stay"));
+    if(!g_weapon_stay)
+        g_weapon_stay = cvar("g_weapon_stay");
 
        if (!g_weapon_stay && (cvar("deathmatch") == 2))
                g_weapon_stay = 1;
@@ -2620,7 +2621,6 @@ void zcurveparticles_from_tracetoss(float effectno, vector start, vector end, ve
        zcurveparticles(effectno, start, end, end_dz, vlen(vel));
 }
 
-string GetGametype(); // g_world.qc
 void write_recordmarker(entity pl, float tstart, float dt)
 {
     GameLogEcho(strcat(":recordset:", ftos(pl.playerid), ":", ftos(dt)));