]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/util.qc
Move fexists from server/miscfunctions.qc to common/util.qc so that it's available...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / util.qc
index b9d6a08d5f63810246c3ac21a30588d28c5712b2..c24693e6d43caa4b5d32e9ce22fe044aa957cb5f 100644 (file)
@@ -474,15 +474,11 @@ string HUD_Panel_GetSettingName(float theSetting)
 
 float updateCompression()
 {
-       float fh;
        float have_dds, have_jpg, have_tga;
        float can_dds;
-       if((have_dds = ((fh = fopen("dds/particles/particlefont.dds", FILE_READ)) >= 0)))
-               fclose(fh);
-       if((have_jpg = ((fh = fopen("particles/particlefont.jpg", FILE_READ)) >= 0)))
-               fclose(fh);
-       if((have_tga = ((fh = fopen("particles/particlefont.tga", FILE_READ)) >= 0)))
-               fclose(fh);
+       have_dds = (fexists("dds/particles/particlefont.dds"));
+       have_dds = (fexists("particles/particlefont.jpg"));
+       have_dds = (fexists("particles/particlefont.tga"));
        can_dds = GL_Have_TextureCompression();
        if(have_dds && (have_jpg || have_tga))
        {
@@ -574,29 +570,6 @@ float GameType_GetCount()
        return i;
 }
 
-string language_filename(string s)
-{
-       string fn;
-       float fh;
-       fn = prvm_language;
-       if(fn == "" || fn == "dump")
-               return s;
-       fn = strcat(s, ".", fn);
-       if((fh = fopen(fn, FILE_READ)) >= 0)
-       {
-               fclose(fh);
-               return fn;
-       }
-       return s;
-}
-string CTX(string s)
-{
-       float p = strstrofs(s, "^", 0);
-       if(p < 0)
-               return s;
-       return substring(s, p+1, -1);
-}
-
 void dialog_hudpanel_common_notoggle(entity me, string panelname)
 {
        float i;