per-gametype weapon_stay cvars. Enable weapon stay by default in: CTF, Assault, CTS...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qc
index 11c97cc..445c5eb 100644 (file)
@@ -1297,7 +1297,9 @@ void readlevelcvars(void)
 
        g_pinata = cvar("g_pinata");
 
 
        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;
 
        if (!g_weapon_stay && (cvar("deathmatch") == 2))
                g_weapon_stay = 1;