r5970 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Feb 25 11:46:49 EST 2009


Author: div0
Date: 2009-02-25 11:46:48 -0500 (Wed, 25 Feb 2009)
New Revision: 5970

Modified:
   trunk/data/qcsrc/server/g_world.qc
Log:
change g_maplist_mostrecent_count behaviour to insert the new map AFTER, not BEFORE loading a map. Makes it also work with the changelevel command.


Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2009-02-25 16:35:56 UTC (rev 5969)
+++ trunk/data/qcsrc/server/g_world.qc	2009-02-25 16:46:48 UTC (rev 5970)
@@ -325,6 +325,7 @@
 	self = oldself;
 }
 
+void Map_MarkAsRecent(string m);
 float world_already_spawned;
 void RegisterWeapons();
 void Nagger_Init();
@@ -431,6 +432,8 @@
 	if(cvar("g_campaign"))
 		CampaignPreInit();
 
+	Map_MarkAsRecent(mapname);
+
 	InitGameplayMode();
 	readlevelcvars();
 	GrappleHookInit();
@@ -717,7 +720,7 @@
 
 void Map_MarkAsRecent(string m)
 {
-	cvar_set("g_maplist_mostrecent", strwords(strcat(m, " ", cvar_string("g_maplist_mostrecent")), cvar("g_maplist_mostrecent_count")));
+	cvar_set("g_maplist_mostrecent", strwords(strcat(m, " ", cvar_string("g_maplist_mostrecent")), max(0, cvar("g_maplist_mostrecent_count"))));
 }
 
 float Map_IsRecent(string m)
@@ -732,8 +735,6 @@
 	map_next = argv(position);
 	if(pass <= 1)
 	{
-		if(map_next == Map_Current_Name) // same map again in first pass?
-			return 0;
 		if(Map_IsRecent(map_next))
 			return 0;
 	}
@@ -778,7 +779,6 @@
 
 void Map_Goto()
 {
-	Map_MarkAsRecent(getmapname_stored);
 	GameResetCfg();
 	MapInfo_LoadMap(getmapname_stored);
 }




More information about the nexuiz-commits mailing list