]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_world.qc
Move fexists from server/miscfunctions.qc to common/util.qc so that it's available...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_world.qc
index 4c41852ebba66057b10d7d906c5b199a55994005..5cfe2fb2395376fb2fb02dbd3bfb2b5868f58fd2 100644 (file)
@@ -940,19 +940,6 @@ void spawnfunc_light (void)
        remove(self);
 }
 
-float TryFile( string pFilename )
-{
-       local float lHandle;
-       dprint("TryFile(\"", pFilename, "\")\n");
-       lHandle = fopen( pFilename, FILE_READ );
-       if( lHandle != -1 ) {
-               fclose( lHandle );
-               return TRUE;
-       } else {
-               return FALSE;
-       }
-};
-
 string GetGametype()
 {
        return GametypeNameFromType(game);
@@ -996,14 +983,12 @@ float MapHasRightSize(string map)
        if(autocvar_g_maplist_check_waypoints)
        {
                dprint("checkwp "); dprint(map);
-               fh = fopen(strcat("maps/", map, ".waypoints"), FILE_READ);
-               if(fh < 0)
+               if(!fexists(strcat("maps/", map, ".waypoints")))
                {
                        dprint(": no waypoints\n");
                        return FALSE;
                }
                dprint(": has waypoints\n");
-               fclose(fh);
        }
 
        // open map size restriction file