fix the missing view model

This commit is contained in:
Bill Currie 2002-06-14 07:55:19 +00:00
parent eaf0f90c2f
commit 9482c151c2
5 changed files with 15 additions and 16 deletions

View file

@ -175,6 +175,8 @@ CL_ClearState (void)
// wipe the entire cl structure
memset (&cl, 0, sizeof (cl));
CL_Init_Entity (&cl.viewent);
SZ_Clear (&cls.message);
// clear other arrays
@ -192,11 +194,7 @@ CL_ClearState (void)
for (i = 0; i < MAX_EDICTS; i++) {
cl_baselines[i].ent = &cl_entities[i];
cl_entities[i].colormod[0] = cl_entities[i].colormod[1] =
cl_entities[i].colormod[2] = cl_entities[i].colormod[3] = 1.0;
cl_entities[i].scale = 16.0;
cl_entities[i].glow_size = 0.0;
cl_entities[i].glow_color = 254;
CL_Init_Entity (cl_entities + i);
}
}

View file

@ -672,9 +672,6 @@ V_CalcRefdef (void)
view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
view->frame = cl.stats[STAT_WEAPONFRAME];
view->colormap = vid.colormap8;
// LordHavoc: make gun visible
view->colormod[0] = view->colormod[1] = view->colormod[2] =
view->colormod[3] = 1.0;
// set up the refresh position
VectorAdd (r_refdef.viewangles, cl.punchangle, r_refdef.viewangles);

View file

@ -119,6 +119,11 @@ CL_Init (void)
{
}
void
CL_Init_Entity (entity_t *ent)
{
}
void
CL_InitCvars (void)
{

View file

@ -401,6 +401,13 @@ CL_ClearState (void)
{
S_StopAllSounds (true);
// wipe the entire cl structure
Info_Destroy (cl.serverinfo);
memset (&cl, 0, sizeof (cl));
cl.serverinfo = Info_ParseString ("", MAX_INFO_STRING);
CL_Init_Entity (&cl.viewent);
Con_DPrintf ("Clearing memory\n");
D_FlushCaches ();
Mod_ClearAll ();
@ -414,11 +421,6 @@ CL_ClearState (void)
R_ClearDlights ();
R_ClearParticles ();
// wipe the entire cl structure
Info_Destroy (cl.serverinfo);
memset (&cl, 0, sizeof (cl));
cl.serverinfo = Info_ParseString ("", MAX_INFO_STRING);
SZ_Clear (&cls.netchan.message);
// clear other arrays

View file

@ -696,9 +696,6 @@ V_CalcRefdef (void)
view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
view->frame = view_message->weaponframe;
view->colormap = vid.colormap8;
// LordHavoc: make gun visible
view->colormod[0] = view->colormod[1] = view->colormod[2] =
view->colormod[3] = 1.0;
// set up the refresh position
r_refdef.viewangles[PITCH] += cl.punchangle;