Fixing positioning with cl_chasecam 1
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@302 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
73cfeca6f3
commit
f8f4157f92
1 changed files with 14 additions and 3 deletions
|
@ -1797,7 +1797,8 @@ void CL_SetUpPlayerPrediction(qboolean dopred)
|
||||||
|
|
||||||
for (j=0, pplayer = predicted_players, state=frame->playerstate;
|
for (j=0, pplayer = predicted_players, state=frame->playerstate;
|
||||||
j < MAX_CLIENTS;
|
j < MAX_CLIENTS;
|
||||||
j++, pplayer++, state++) {
|
j++, pplayer++, state++)
|
||||||
|
{
|
||||||
|
|
||||||
pplayer->active = false;
|
pplayer->active = false;
|
||||||
|
|
||||||
|
@ -1824,10 +1825,13 @@ void CL_SetUpPlayerPrediction(qboolean dopred)
|
||||||
|
|
||||||
// note that the local player is special, since he moves locally
|
// note that the local player is special, since he moves locally
|
||||||
// we use his last predicted postition
|
// we use his last predicted postition
|
||||||
if (j == cl.playernum[0]) {
|
if (j == cl.playernum[0])
|
||||||
|
{
|
||||||
VectorCopy(cl.frames[cls.netchan.outgoing_sequence&UPDATE_MASK].playerstate[cl.playernum[0]].origin,
|
VectorCopy(cl.frames[cls.netchan.outgoing_sequence&UPDATE_MASK].playerstate[cl.playernum[0]].origin,
|
||||||
pplayer->origin);
|
pplayer->origin);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// only predict half the move to minimize overruns
|
// only predict half the move to minimize overruns
|
||||||
msec = 500*(playertime - state->state_time);
|
msec = 500*(playertime - state->state_time);
|
||||||
if (msec <= 0 ||
|
if (msec <= 0 ||
|
||||||
|
@ -1848,6 +1852,13 @@ void CL_SetUpPlayerPrediction(qboolean dopred)
|
||||||
CL_PredictUsercmd (0, state, &exact, &state->command);
|
CL_PredictUsercmd (0, state, &exact, &state->command);
|
||||||
VectorCopy (exact.origin, pplayer->origin);
|
VectorCopy (exact.origin, pplayer->origin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cl.spectator)
|
||||||
|
{
|
||||||
|
if (!Cam_DrawPlayer(0, j))
|
||||||
|
VectorCopy(pplayer->origin, cl.simorg[0]);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue