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

from Zack Middleton in ioquake3
svn 2317 git 02f3664b2e01591864b1d4022a8d7ddf10787f33
This commit is contained in:
Jonathan Gray 2013-05-07 22:03:24 +10:00
parent 2cb6b49d77
commit ef39017afd
1 changed files with 10 additions and 0 deletions

View File

@ -1526,6 +1526,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 {