make sure we don't get stuck in the console when the server is in

intermission mode. As far as I can tell, it's pure luck wether the
svc_intermission comes before or after the first pass through the prediction
code, and if it comes before, the prediction code will never run and thus
never realise that it's ok to start rendering, so force the issue if in
intermission mode.
This commit is contained in:
Bill Currie 2002-06-21 05:15:16 +00:00
parent f8dee80355
commit a83ecbd23a

View file

@ -100,6 +100,17 @@ CL_PredictUsercmd (player_state_t * from, player_state_t * to, usercmd_t *u,
to->weaponframe = from->weaponframe;
}
static inline void
check_onserver (void)
{
// we can now render a frame
if (cls.state == ca_onserver) {
// first update is the final signon stage
VID_SetCaption (cls.servername);
CL_SetState (ca_active);
}
}
void
CL_PredictMove (void)
{
@ -120,8 +131,10 @@ CL_PredictMove (void)
if (cl.time > realtime)
cl.time = realtime;
if (cl.intermission)
if (cl.intermission) {
check_onserver ();
return;
}
if (!cl.validsequence)
return;
@ -135,12 +148,7 @@ CL_PredictMove (void)
// this is the last frame received from the server
from = &cl.frames[cls.netchan.incoming_sequence & UPDATE_MASK];
// we can now render a frame
if (cls.state == ca_onserver) {
// first update is the final signon stage
VID_SetCaption (cls.servername);
CL_SetState (ca_active);
}
check_onserver ();
if (!cl_predict->int_val) {
VectorCopy (from->playerstate[cl.playernum].velocity, cl.simvel);