]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qc
add a missing variable
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qc
index a2f4201019a46e19c1b45b78dc8c5d0f38a88a41..a40982ce7e2f733f72ac43aedef9564af457c120 100644 (file)
@@ -915,8 +915,15 @@ void readplayerstartcvars()
 
        g_weaponarena = 0;
        s = cvar_string("g_weaponarena");
-       if (s == "0")
+       if (s == "0" || s == "")
        {
+               if(g_lms || g_ca)
+                       s = "most";
+       }
+
+       if (s == "off")
+       {
+               // forcibly turn off weaponarena
        }
        else if (s == "all")
        {
@@ -1528,8 +1535,12 @@ void precache_playermodel(string m)
        precache_model(m);
        if(sv_loddistance1)
        {
-               precache_model(strcat(substring(m, 0, -5), "_lod1", substring(m, -4, -1)));
-               precache_model(strcat(substring(m, 0, -5), "_lod2", substring(m, -4, -1)));
+               f = strcat(substring(m, 0, -5), "_lod1", substring(m, -4, -1));
+               if(fexists(f))
+                       precache_model(f);
+               f = strcat(substring(m, 0, -5), "_lod2", substring(m, -4, -1));
+               if(fexists(f))
+                       precache_model(f);
        }
 
        globhandle = search_begin(strcat(m, "_*.sounds"), TRUE, FALSE);