r1762 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Jul 19 05:25:04 EDT 2006
Author: div0
Date: 2006-07-19 05:25:04 -0400 (Wed, 19 Jul 2006)
New Revision: 1762
Modified:
trunk/data/qcsrc/server/g_world.qc
Log:
some additional prints; set maplist index only on success so the 2nd pass works right
Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc 2006-07-19 09:12:17 UTC (rev 1761)
+++ trunk/data/qcsrc/server/g_world.qc 2006-07-19 09:25:04 UTC (rev 1762)
@@ -420,18 +420,27 @@
{
// open map size restriction file
float fh;
+ dprint("opensize "); dprint(map);
fh = fopen(strcat("maps/", map, ".sizes"), FILE_READ);
if(fh >= 0)
{
float mapmin, mapmax;
+ dprint(": ok, ");
mapmin = stof(fgets(fh));
mapmax = stof(fgets(fh));
fclose(fh);
if(player_count < mapmin)
+ {
+ dprint("not enough\n");
return FALSE;
+ }
if(player_count > mapmax)
+ {
+ dprint("too many\n");
return FALSE;
+ }
}
+ dprint(": not found\n");
return TRUE;
}
@@ -540,6 +549,10 @@
cvar_set("g_maplist", cvar_string("g_maplist_defaultlist"));
// let the loop restart with the default list now
}
+ else
+ {
+ dprint("wrong size, now trying all\n");
+ }
}
else
{
@@ -549,12 +562,11 @@
break;
}
- cvar_set( "g_maplist_index", ftos( lCurrent ) );
-
lFilename = strzone(strcat( "maps/", argv( lCurrent ), ".mapcfg" ));
if( TryFile( lFilename ) ) {
if((pass == 2) || MapHasRightSize(argv(lCurrent)))
{
+ cvar_set( "g_maplist_index", ftos( lCurrent ) );
localcmd(strcat("exec \"", lFilename ,"\"\n"));
strunzone(lFilename);
pass = 2; // exit the outer loop
More information about the nexuiz-commits
mailing list