Skip to content

Commit

Permalink
CAM: Don't try and track ghosts when watching qtv/mvd
Browse files Browse the repository at this point in the history
Example given by praxismo: if tracking one player and pressing jump
  to watch the next, if the next player is a ghost, the camera gets
  'stuck'.  Now it skips over the ghost and moves on to the next
  connected player.
Should probably skip them on standard spec slots too, but it survives
  because mvdsv returns "invalid client to track"... there are other
  issues with that and client numbers changing, so leaving for another
  day.
  • Loading branch information
meag committed May 8, 2018
1 parent 0edab7b commit 236a8d6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cl_cam.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,16 +588,17 @@ void Cam_FinishMove(usercmd_t *cmd)
i = end;
do {
s = &cl.players[i];
if (s->name[0] && !s->spectator) {
if (cls.mvdplayback && cl.teamfortress)
if (s->name[0] && !s->spectator && (!cls.mvdplayback || cl.frames[cl.parsecount & UPDATE_MASK].playerstate[i].messagenum == cl.parsecount)) {
if (cls.mvdplayback && cl.teamfortress) {
V_TF_ClearGrenadeEffects(); // BorisU
}
Cam_Lock(i);
ideal_track = i;
return;
}
i = (i + MAX_CLIENTS + inc) % MAX_CLIENTS;
} while (i != end);
// stay on same guy?
// stay on same guy?

i = ideal_track;
s = &cl.players[i];
Expand Down

0 comments on commit 236a8d6

Please sign in to comment.