[quake3-commits] r2317 - trunk/code/game

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Sep 9 21:22:14 EDT 2012


Author: ztm
Date: 2012-09-09 21:22:13 -0400 (Sun, 09 Sep 2012)
New Revision: 2317

Modified:
   trunk/code/game/g_cmds.c
Log:
Fix game getting stuck in a do-while loop when "team follow1" or "team follow2" client sends a follownext or followprev command.

Modified: trunk/code/game/g_cmds.c
===================================================================
--- trunk/code/game/g_cmds.c	2012-09-09 22:14:15 UTC (rev 2316)
+++ trunk/code/game/g_cmds.c	2012-09-10 01:22:13 UTC (rev 2317)
@@ -749,6 +749,16 @@
 		G_Error( "Cmd_FollowCycle_f: bad dir %i", dir );
 	}
 
+	// if dedicated follow client, just switch between the two auto clients
+	if (ent->client->sess.spectatorClient < 0) {
+		if (ent->client->sess.spectatorClient == -1) {
+			ent->client->sess.spectatorClient = -2;
+		} else if (ent->client->sess.spectatorClient == -2) {
+			ent->client->sess.spectatorClient = -1;
+		}
+		return;
+	}
+
 	clientnum = ent->client->sess.spectatorClient;
 	original = clientnum;
 	do {



More information about the quake3-commits mailing list