r2652 - in branches/nexuiz-2.0/data: . menu/data qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue May 22 03:55:34 EDT 2007


Author: div0
Date: 2007-05-22 03:55:28 -0400 (Tue, 22 May 2007)
New Revision: 2652

Modified:
   branches/nexuiz-2.0/data/default.cfg
   branches/nexuiz-2.0/data/menu/data/effects.menu
   branches/nexuiz-2.0/data/qcsrc/server/bots.qc
   branches/nexuiz-2.0/data/qcsrc/server/ctf.qc
   branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
   branches/nexuiz-2.0/data/qcsrc/server/keyhunt.qc
Log:
r_shadow_realtime_world_dlightshadows is dead! Long live r_shadow_realtime_dlight_shadows!
Set dphitcontentsmask on keys/flags so they honor playerclip. No more flags/keys in unreachable places!
Removed an annoying dprint in KH.
Map voting now runs in CheckRules_World, fixes the "31 seconds" bug.
minplayers now doesn't honor spectators in LMS and Arena game mode any more.


Modified: branches/nexuiz-2.0/data/default.cfg
===================================================================
--- branches/nexuiz-2.0/data/default.cfg	2007-05-21 22:06:46 UTC (rev 2651)
+++ branches/nexuiz-2.0/data/default.cfg	2007-05-22 07:55:28 UTC (rev 2652)
@@ -751,6 +751,3 @@
 
 // so it can be stuffcmd-ed still
 set cl_gravity 800 // but ignored anyway
-
-// to set both cvars at once (for the menu)
-alias _r_shadow_rwds_and_rds "r_shadow_realtime_world_dlightshadows $1 ; r_shadow_realtime_dlight_shadows $1"

Modified: branches/nexuiz-2.0/data/menu/data/effects.menu
===================================================================
--- branches/nexuiz-2.0/data/menu/data/effects.menu	2007-05-21 22:06:46 UTC (rev 2651)
+++ branches/nexuiz-2.0/data/menu/data/effects.menu	2007-05-22 07:55:28 UTC (rev 2652)
@@ -84,10 +84,9 @@
 
 		[DataLink_OnOffSwitch]
 	}
-	Item Data_ServerCvar RealtimeDLightShadows
+	Item Data_Cvar RealtimeDLightShadows
 	{
-		cvarName	"r_shadow_realtime_world_dlightshadows"
-		syncCmd     "_r_shadow_rwds_and_rds"
+		cvarName	"r_shadow_realtime_dlight_shadows"
 		defValue	0
 
 		[DataLink_OnOffSwitch]

Modified: branches/nexuiz-2.0/data/qcsrc/server/bots.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/bots.qc	2007-05-21 22:06:46 UTC (rev 2651)
+++ branches/nexuiz-2.0/data/qcsrc/server/bots.qc	2007-05-22 07:55:28 UTC (rev 2652)
@@ -2084,7 +2084,7 @@
 
 	FOR_EACH_REALCLIENT(head)
 	{
-		if(head.classname == "player")
+		if(head.classname == "player" || cvar("g_lms") || cvar("g_arena"))
 			++activerealplayers;
 		++realplayers;
 	}

Modified: branches/nexuiz-2.0/data/qcsrc/server/ctf.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/ctf.qc	2007-05-21 22:06:46 UTC (rev 2651)
+++ branches/nexuiz-2.0/data/qcsrc/server/ctf.qc	2007-05-22 07:55:28 UTC (rev 2652)
@@ -32,6 +32,7 @@
 	self.nextthink = time + 0.1;
 	self.cnt = FLAG_BASE;
 	self.mangle = self.angles;
+	self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;
 	//self.effects = self.effects | EF_DIMLIGHT;
 	if (!droptofloor())
 	{

Modified: branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2007-05-21 22:06:46 UTC (rev 2651)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2007-05-22 07:55:28 UTC (rev 2652)
@@ -736,6 +736,7 @@
 ============
 */
 .float autoscreenshot;
+void() MapVote_Start;
 void() MapVote_Think;
 float mapvote_initialized;
 void() IntermissionThink =
@@ -759,8 +760,7 @@
 		if (time < intermission_exittime + 10 && !self.button0 && !self.button2 && !self.button3 && !self.button6 && !self.buttonuse)
 			return;
 
-	if(intermission_exittime >= 0)
-		MapVote_Think();
+	MapVote_Start();
 };
 
 /*
@@ -937,7 +937,7 @@
 	if(player_count > 0)
 		intermission_exittime = time + cvar("sv_mapchange_delay");
 	else
-		intermission_exittime = -60;
+		intermission_exittime = -1;
 
 	WriteByte (MSG_ALL, SVC_CDTRACK);
 	WriteByte (MSG_ALL, 3);
@@ -1432,9 +1432,12 @@
 	local float fraglimit;
 
 	VoteThink();
+	MapVote_Think();
 
 	SetDefaultAlpha();
 
+	/*
+	MapVote_Think should now do that part
 	if (intermission_running)
 		if (time >= intermission_exittime + 60)
 		{
@@ -1442,9 +1445,16 @@
 				GotoNextMap();
 			return;
 		}
+	*/
 
 	if (gameover)	// someone else quit the game already
+	{
+		if(player_count == 0) // Nobody there? Then let's go to the next map
+			MapVote_Start();
+			// this will actually check the player count in the next frame
+			// again, but this shouldn't hurt
 		return;
+	}
 
 	timelimit = cvar("timelimit") * 60;
 	fraglimit = cvar("fraglimit");
@@ -1558,6 +1568,7 @@
 float mapvote_maxlen;
 float mapvote_voters;
 float mapvote_votes[MAPVOTE_COUNT];
+float mapvote_run;
 .float mapvote;
 
 void MapVote_ClearAllVotes()
@@ -1835,8 +1846,15 @@
 		centerprint_atprio(other, CENTERPRIO_MAPVOTE, msgstr);
 	}
 }
+void MapVote_Start()
+{
+	mapvote_run = TRUE;
+}
 void MapVote_Think()
 {
+	if(!mapvote_run)
+		return;
+
 	if(alreadychangedlevel)
 		return;
 
@@ -1854,7 +1872,7 @@
 			alreadychangedlevel = TRUE;
 			return;
 		}
-		if(!cvar("g_maplist_votable"))
+		if(!cvar("g_maplist_votable") || player_count <= 0)
 		{
 			GotoNextMap();
 			return;

Modified: branches/nexuiz-2.0/data/qcsrc/server/keyhunt.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/keyhunt.qc	2007-05-21 22:06:46 UTC (rev 2651)
+++ branches/nexuiz-2.0/data/qcsrc/server/keyhunt.qc	2007-05-22 07:55:28 UTC (rev 2652)
@@ -318,6 +318,7 @@
 	key.modelindex = kh_key_dropped;
 	key.model = "key";
 	key.kh_dropperteam = 0;
+	key.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;
 	setsize(key, KH_KEY_MIN, KH_KEY_MAX);
 	key.colormod = kh_TeamColor(initial_owner.team) * KH_KEY_BRIGHTNESS;
 
@@ -551,7 +552,7 @@
 		vector thisorigin;
 
 		thisorigin = kh_AttachedOrigin(key);
-		dprint("Key origin: ", vtos(thisorigin), "\n");
+		//dprint("Key origin: ", vtos(thisorigin), "\n");
 		midpoint += thisorigin;
 
 		if(!first)




More information about the nexuiz-commits mailing list