[qw] Fix some segfaults in chase mode
And unconditionally allow chase cam when playing demos.
This commit is contained in:
parent
6ec8e29429
commit
6573acbc74
|
@ -399,6 +399,9 @@ CL_ClearState (void)
|
||||||
cl.maxclients = MAX_CLIENTS;
|
cl.maxclients = MAX_CLIENTS;
|
||||||
cl.viewstate.voffs_enabled = 0;
|
cl.viewstate.voffs_enabled = 0;
|
||||||
cl.viewstate.chasestate = &cl.chasestate;
|
cl.viewstate.chasestate = &cl.chasestate;
|
||||||
|
cl.chasestate.viewstate = &cl.viewstate;
|
||||||
|
cl.viewstate.punchangle = (vec4f_t) {0, 0, 0, 1};
|
||||||
|
|
||||||
|
|
||||||
// Note: we should probably hack around this and give diff values for
|
// Note: we should probably hack around this and give diff values for
|
||||||
// diff gamedirs
|
// diff gamedirs
|
||||||
|
@ -623,6 +626,7 @@ CL_FullServerinfo_f (void)
|
||||||
if ((p = Info_ValueForKey (cl.serverinfo, "chase")) && *p) {
|
if ((p = Info_ValueForKey (cl.serverinfo, "chase")) && *p) {
|
||||||
cl.viewstate.chase = atoi (p);
|
cl.viewstate.chase = atoi (p);
|
||||||
}
|
}
|
||||||
|
cl.viewstate.chase |= cls.demoplayback;
|
||||||
if ((p = Info_ValueForKey (cl.serverinfo, "cshifts")) && *p) {
|
if ((p = Info_ValueForKey (cl.serverinfo, "cshifts")) && *p) {
|
||||||
cl.sv_cshifts = atoi (p);
|
cl.sv_cshifts = atoi (p);
|
||||||
}
|
}
|
||||||
|
@ -1341,6 +1345,7 @@ CL_Init_Cvars (void)
|
||||||
Game_Init_Cvars ();
|
Game_Init_Cvars ();
|
||||||
Pmove_Init_Cvars ();
|
Pmove_Init_Cvars ();
|
||||||
Team_Init_Cvars ();
|
Team_Init_Cvars ();
|
||||||
|
Chase_Init_Cvars ();
|
||||||
V_Init_Cvars ();
|
V_Init_Cvars ();
|
||||||
|
|
||||||
cl_pitchspeed->callback = cl_pitchspeed_f;
|
cl_pitchspeed->callback = cl_pitchspeed_f;
|
||||||
|
|
|
@ -414,6 +414,7 @@ Model_NextDownload (void)
|
||||||
|
|
||||||
// all done
|
// all done
|
||||||
cl.worldmodel = cl.model_precache[1];
|
cl.worldmodel = cl.model_precache[1];
|
||||||
|
cl.chasestate.worldmodel = cl.worldmodel;
|
||||||
CL_NewMap (cl.model_name[1]);
|
CL_NewMap (cl.model_name[1]);
|
||||||
|
|
||||||
// done with modellist, request first of static signon messages
|
// done with modellist, request first of static signon messages
|
||||||
|
|
Loading…
Reference in New Issue