mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +00:00
fix the missing view model
This commit is contained in:
parent
eaf0f90c2f
commit
9482c151c2
5 changed files with 15 additions and 16 deletions
|
@ -175,6 +175,8 @@ CL_ClearState (void)
|
||||||
// wipe the entire cl structure
|
// wipe the entire cl structure
|
||||||
memset (&cl, 0, sizeof (cl));
|
memset (&cl, 0, sizeof (cl));
|
||||||
|
|
||||||
|
CL_Init_Entity (&cl.viewent);
|
||||||
|
|
||||||
SZ_Clear (&cls.message);
|
SZ_Clear (&cls.message);
|
||||||
|
|
||||||
// clear other arrays
|
// clear other arrays
|
||||||
|
@ -192,11 +194,7 @@ CL_ClearState (void)
|
||||||
|
|
||||||
for (i = 0; i < MAX_EDICTS; i++) {
|
for (i = 0; i < MAX_EDICTS; i++) {
|
||||||
cl_baselines[i].ent = &cl_entities[i];
|
cl_baselines[i].ent = &cl_entities[i];
|
||||||
cl_entities[i].colormod[0] = cl_entities[i].colormod[1] =
|
CL_Init_Entity (cl_entities + i);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -672,9 +672,6 @@ V_CalcRefdef (void)
|
||||||
view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
|
view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
|
||||||
view->frame = cl.stats[STAT_WEAPONFRAME];
|
view->frame = cl.stats[STAT_WEAPONFRAME];
|
||||||
view->colormap = vid.colormap8;
|
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
|
// set up the refresh position
|
||||||
VectorAdd (r_refdef.viewangles, cl.punchangle, r_refdef.viewangles);
|
VectorAdd (r_refdef.viewangles, cl.punchangle, r_refdef.viewangles);
|
||||||
|
|
|
@ -119,6 +119,11 @@ CL_Init (void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CL_Init_Entity (entity_t *ent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CL_InitCvars (void)
|
CL_InitCvars (void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -401,6 +401,13 @@ CL_ClearState (void)
|
||||||
{
|
{
|
||||||
S_StopAllSounds (true);
|
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");
|
Con_DPrintf ("Clearing memory\n");
|
||||||
D_FlushCaches ();
|
D_FlushCaches ();
|
||||||
Mod_ClearAll ();
|
Mod_ClearAll ();
|
||||||
|
@ -414,11 +421,6 @@ CL_ClearState (void)
|
||||||
R_ClearDlights ();
|
R_ClearDlights ();
|
||||||
R_ClearParticles ();
|
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);
|
SZ_Clear (&cls.netchan.message);
|
||||||
|
|
||||||
// clear other arrays
|
// clear other arrays
|
||||||
|
|
|
@ -696,9 +696,6 @@ V_CalcRefdef (void)
|
||||||
view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
|
view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
|
||||||
view->frame = view_message->weaponframe;
|
view->frame = view_message->weaponframe;
|
||||||
view->colormap = vid.colormap8;
|
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
|
// set up the refresh position
|
||||||
r_refdef.viewangles[PITCH] += cl.punchangle;
|
r_refdef.viewangles[PITCH] += cl.punchangle;
|
||||||
|
|
Loading…
Reference in a new issue