Fix game getting stuck in a do-while loop when "team follow1" or "team follow2" client sends a follownext or followprev command.

This commit is contained in:
Zack Middleton 2012-09-10 01:22:13 +00:00
parent c65142179f
commit 02f3664b2e

View file

@ -749,6 +749,16 @@ void Cmd_FollowCycle_f( gentity_t *ent, int dir ) {
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 {