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