r1922 - branches/nexuiz-2.0/data/qcsrc/server trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Nov 10 21:42:00 EST 2006


Author: kadaverjack
Date: 2006-11-10 21:42:00 -0500 (Fri, 10 Nov 2006)
New Revision: 1922

Modified:
   branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
   trunk/data/qcsrc/server/g_world.qc
Log:
fixed sv_autoscreenshot (again... the last fix worked for me locally, but didn't work online... i hope it's foolproof now)


Modified: branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2006-11-10 19:44:27 UTC (rev 1921)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2006-11-11 02:42:00 UTC (rev 1922)
@@ -661,6 +661,14 @@
 */
 void() IntermissionThink =
 {
+	if(self.cnt)
+	if(self.cnt > time)
+	{
+		self.cnt = FALSE;
+		if(clienttype(self) == CLIENTTYPE_REAL)
+		if(cvar("sv_autoscreenshot"))
+			stuffcmd(self, "wait\nscreenshot\necho \"^5A screenshot has been taken at request of the server.\"\n");
+	}
 	if (time < intermission_exittime)
 		return;
 
@@ -825,6 +833,7 @@
 		other.movetype = MOVETYPE_NONE;
 		other.angles = other.v_angle;
 		other.angles_x = other.angles_x * -1;
+		other.cnt = time + 0.5;	// used for autoscreenshot
 
 		self = other;
 
@@ -854,15 +863,6 @@
 		CampaignPreIntermission();
 
 	WriteByte (MSG_ALL, SVC_INTERMISSION);
-
-	other = findchainflags(flags, FL_CLIENT);
-	while(other)
-	{
-		if(clienttype(other) == CLIENTTYPE_REAL)
-		if(cvar("sv_autoscreenshot"))
-			stuffcmd(other, "wait\nscreenshot\necho \"^5A screenshot has been taken at request of the server.\"\n");
-		other = other.chain;
-	}
 };
 
 /*

Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2006-11-10 19:44:27 UTC (rev 1921)
+++ trunk/data/qcsrc/server/g_world.qc	2006-11-11 02:42:00 UTC (rev 1922)
@@ -696,6 +696,14 @@
 */
 void() IntermissionThink =
 {
+	if(self.cnt)
+	if(self.cnt > time)
+	{
+		self.cnt = FALSE;
+		if(clienttype(self) == CLIENTTYPE_REAL)
+		if(cvar("sv_autoscreenshot"))
+			stuffcmd(self, "wait\nscreenshot\necho \"^5A screenshot has been taken at request of the server.\"\n");
+	}
 	if (time < intermission_exittime)
 		return;
 
@@ -860,6 +868,7 @@
 		other.movetype = MOVETYPE_NONE;
 		other.angles = other.v_angle;
 		other.angles_x = other.angles_x * -1;
+		other.cnt = time + 0.5;	// used for autoscreenshot
 
 		self = other;
 
@@ -889,15 +898,6 @@
 		CampaignPreIntermission();
 
 	WriteByte (MSG_ALL, SVC_INTERMISSION);
-
-	other = findchainflags(flags, FL_CLIENT);
-	while(other)
-	{
-		if(clienttype(other) == CLIENTTYPE_REAL)
-		if(cvar("sv_autoscreenshot"))
-			stuffcmd(other, "wait\nscreenshot\necho \"^5A screenshot has been taken at request of the server.\"\n");
-		other = other.chain;
-	}
 };
 
 /*




More information about the nexuiz-commits mailing list