mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
various little cleanups that should very fractionally speed up Host_Frame
This commit is contained in:
parent
a35c33b397
commit
2cc2da4d90
9 changed files with 15 additions and 14 deletions
|
@ -151,6 +151,7 @@ CL_ClearState (void)
|
|||
|
||||
// wipe the entire cl structure
|
||||
memset (&cl, 0, sizeof (cl));
|
||||
r_force_fullscreen = 0;
|
||||
|
||||
CL_Init_Entity (&cl.viewent);
|
||||
|
||||
|
|
|
@ -910,7 +910,7 @@ CL_ParseServerMessage (void)
|
|||
|
||||
case svc_setpause:
|
||||
{
|
||||
cl.paused = MSG_ReadByte (net_message);
|
||||
r_paused = cl.paused = MSG_ReadByte (net_message);
|
||||
|
||||
if (cl.paused) {
|
||||
CDAudio_Pause ();
|
||||
|
@ -960,12 +960,14 @@ CL_ParseServerMessage (void)
|
|||
|
||||
case svc_intermission:
|
||||
cl.intermission = 1;
|
||||
r_force_fullscreen = 1;
|
||||
cl.completed_time = cl.time;
|
||||
vid.recalc_refdef = true; // go to full screen
|
||||
break;
|
||||
|
||||
case svc_finale:
|
||||
cl.intermission = 2;
|
||||
r_force_fullscreen = 1;
|
||||
cl.completed_time = cl.time;
|
||||
vid.recalc_refdef = true; // go to full screen
|
||||
Sbar_CenterPrint (MSG_ReadString (net_message));
|
||||
|
@ -973,6 +975,7 @@ CL_ParseServerMessage (void)
|
|||
|
||||
case svc_cutscene:
|
||||
cl.intermission = 3;
|
||||
r_force_fullscreen = 1;
|
||||
cl.completed_time = cl.time;
|
||||
vid.recalc_refdef = true; // go to full screen
|
||||
Sbar_CenterPrint (MSG_ReadString (net_message));
|
||||
|
|
|
@ -138,6 +138,7 @@ CL_ClearTEnts (void)
|
|||
for (i = 0; i < MAX_EXPLOSIONS; i++) {
|
||||
CL_Init_Entity (&cl_explosions[i].ent);
|
||||
}
|
||||
r_view_model = &cl.viewent;
|
||||
}
|
||||
|
||||
static explosion_t *
|
||||
|
|
|
@ -704,8 +704,7 @@ V_CalcRefdef (void)
|
|||
void
|
||||
V_RenderView (void)
|
||||
{
|
||||
r_worldentity.model = cl.worldmodel;
|
||||
if (!cl.worldmodel || cls.signon != SIGNONS)
|
||||
if (cls.signon != SIGNONS)
|
||||
return;
|
||||
|
||||
// don't allow cheats in multiplayer
|
||||
|
|
|
@ -521,6 +521,7 @@ Host_ClearMemory (void)
|
|||
cls.signon = 0;
|
||||
memset (&sv, 0, sizeof (sv));
|
||||
memset (&cl, 0, sizeof (cl));
|
||||
r_force_fullscreen = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -611,10 +612,6 @@ Host_ClientFrame (void)
|
|||
r_inhibit_viewmodel = (chase_active->int_val
|
||||
|| (cl.stats[STAT_ITEMS] & IT_INVISIBILITY)
|
||||
|| cl.stats[STAT_HEALTH] <= 0);
|
||||
r_force_fullscreen = cl.intermission;
|
||||
r_paused = cl.paused;
|
||||
r_active = cls.state == ca_active;
|
||||
r_view_model = &cl.viewent;
|
||||
r_frametime = host_frametime;
|
||||
|
||||
CL_UpdateScreen (cl.time);
|
||||
|
|
|
@ -1195,4 +1195,5 @@ CL_Ents_Init (void)
|
|||
|
||||
for (i = 0; i < MAX_PROJECTILES; i++)
|
||||
CL_Init_Entity (&cl_projectiles[i]);
|
||||
r_view_model = &cl.viewent;
|
||||
}
|
||||
|
|
|
@ -398,6 +398,7 @@ CL_ClearState (void)
|
|||
// wipe the entire cl structure
|
||||
Info_Destroy (cl.serverinfo);
|
||||
memset (&cl, 0, sizeof (cl));
|
||||
r_force_fullscreen = 0;
|
||||
|
||||
// Note: we should probably hack around this and give diff values for diff gamedirs
|
||||
cl.fpd = FPD_DEFAULT;
|
||||
|
@ -795,6 +796,7 @@ CL_Changing_f (void)
|
|||
|
||||
S_StopAllSounds (true);
|
||||
cl.intermission = 0;
|
||||
r_force_fullscreen = 0;
|
||||
CL_SetState (ca_connected); // not active anymore, but not
|
||||
// disconnected
|
||||
Con_Printf ("\nChanging map...\n");
|
||||
|
@ -1582,10 +1584,6 @@ Host_Frame (float time)
|
|||
r_inhibit_viewmodel = (!Cam_DrawViewModel ()
|
||||
|| (cl.stats[STAT_ITEMS] & IT_INVISIBILITY)
|
||||
|| cl.stats[STAT_HEALTH] <= 0);
|
||||
r_force_fullscreen = cl.intermission;
|
||||
r_paused = cl.paused;
|
||||
r_active = cls.state == ca_active;
|
||||
r_view_model = &cl.viewent;
|
||||
r_frametime = host_frametime;
|
||||
|
||||
CL_UpdateScreen (realtime);
|
||||
|
|
|
@ -1424,6 +1424,7 @@ CL_ParseServerMessage (void)
|
|||
Con_DPrintf ("svc_intermission\n");
|
||||
|
||||
cl.intermission = 1;
|
||||
r_force_fullscreen = 1;
|
||||
cl.completed_time = realtime;
|
||||
vid.recalc_refdef = true; // go to full screen
|
||||
Con_DPrintf ("intermission simorg: ");
|
||||
|
@ -1445,6 +1446,7 @@ CL_ParseServerMessage (void)
|
|||
|
||||
case svc_finale:
|
||||
cl.intermission = 2;
|
||||
r_force_fullscreen = 1;
|
||||
cl.completed_time = realtime;
|
||||
vid.recalc_refdef = true; // go to full screen
|
||||
Sbar_CenterPrint (MSG_ReadString (net_message));
|
||||
|
@ -1526,7 +1528,7 @@ CL_ParseServerMessage (void)
|
|||
break;
|
||||
|
||||
case svc_setpause:
|
||||
cl.paused = MSG_ReadByte (net_message);
|
||||
r_paused = cl.paused = MSG_ReadByte (net_message);
|
||||
if (cl.paused)
|
||||
CDAudio_Pause ();
|
||||
else
|
||||
|
|
|
@ -717,8 +717,7 @@ V_RenderView (void)
|
|||
{
|
||||
cl.simangles[ROLL] = 0; // FIXME @@@
|
||||
|
||||
r_worldentity.model = cl.worldmodel;
|
||||
if (cls.state != ca_active)
|
||||
if (!r_active)
|
||||
return;
|
||||
|
||||
view_frame = &cl.frames[cls.netchan.incoming_sequence & UPDATE_MASK];
|
||||
|
|
Loading…
Reference in a new issue