Skip to content

Commit

Permalink
Fix game getting stuck in a do-while loop when "team follow1" or "tea…
Browse files Browse the repository at this point in the history
…m follow2" client sends a follownext or followprev command.
  • Loading branch information
zturtleman committed Sep 10, 2012
1 parent c651421 commit 02f3664
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions code/game/g_cmds.c
Expand Up @@ -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 {
Expand Down

0 comments on commit 02f3664

Please sign in to comment.