r6096 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Mar 10 02:39:43 EDT 2009
Author: div0
Date: 2009-03-10 02:39:43 -0400 (Tue, 10 Mar 2009)
New Revision: 6096
Modified:
trunk/data/qcsrc/server/g_world.qc
Log:
initialize mapinfo on startup (so the gametype command becomes available)
Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc 2009-03-10 06:19:59 UTC (rev 6095)
+++ trunk/data/qcsrc/server/g_world.qc 2009-03-10 06:39:43 UTC (rev 6096)
@@ -133,6 +133,7 @@
void GotoFirstMap()
{
+ float n;
if(cvar("_sv_init"))
{
// cvar_set("_sv_init", "0");
@@ -141,10 +142,9 @@
// harm
if(cvar("g_maplist_shuffle"))
ShuffleMaplist();
- tokenizebyseparator(cvar_string("g_maplist"), " ");
+ n = tokenizebyseparator(cvar_string("g_maplist"), " ");
+ cvar_set("g_maplist_index", ftos(n - 1)); // jump to map 0 in GotoNextMap
- cvar_set("nextmap", argv(0));
-
MapInfo_Enumerate();
MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, (g_maplist_allow_hidden ? 0 : MAPINFO_FLAG_HIDDEN), 0);
@@ -354,6 +354,10 @@
e.classname = "info_player_deathmatch"; // safeguard against player joining
self.classname = "worldspawn"; // safeguard against various stuff ;)
+
+ g_maplist_allow_hidden = cvar("g_maplist_allow_hidden");
+ MapInfo_Enumerate();
+ MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, (g_maplist_allow_hidden ? 0 : MAPINFO_FLAG_HIDDEN), 0);
}
void Map_MarkAsRecent(string m);
More information about the nexuiz-commits
mailing list