mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 23:11:38 +00:00
Fix a new bug with dlights, more cleanups.
This commit is contained in:
parent
048a80ce23
commit
924cdf917d
6 changed files with 32 additions and 17 deletions
|
@ -187,6 +187,22 @@ CL_ClearState (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
CL_StopCshifts
|
||||||
|
|
||||||
|
Cleans the Cshifts, so your screen doesn't stay red after a timedemo :)
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
CL_StopCshifts (void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < NUM_CSHIFTS; i++)
|
||||||
|
cl.cshifts[i].percent = 0;
|
||||||
|
for (i = 0; i < MAX_CL_STATS; i++)
|
||||||
|
cl.stats[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
CL_Disconnect
|
CL_Disconnect
|
||||||
|
|
||||||
|
@ -196,13 +212,16 @@ CL_ClearState (void)
|
||||||
void
|
void
|
||||||
CL_Disconnect (void)
|
CL_Disconnect (void)
|
||||||
{
|
{
|
||||||
// stop sounds (especially looping!)
|
// stop sounds (especially looping!)
|
||||||
S_StopAllSounds (true);
|
S_StopAllSounds (true);
|
||||||
|
|
||||||
// bring the console down and fade the colors back to normal
|
// Clean the Cshifts
|
||||||
// SCR_BringDownConsole ();
|
CL_StopCshifts ();
|
||||||
|
|
||||||
// if running a local server, shut it down
|
// bring the console down and fade the colors back to normal
|
||||||
|
// SCR_BringDownConsole ();
|
||||||
|
|
||||||
|
// if running a local server, shut it down
|
||||||
if (cls.demoplayback)
|
if (cls.demoplayback)
|
||||||
CL_StopPlayback ();
|
CL_StopPlayback ();
|
||||||
else if (cls.state == ca_connected) {
|
else if (cls.state == ca_connected) {
|
||||||
|
|
|
@ -888,6 +888,8 @@ R_RenderView (void)
|
||||||
|
|
||||||
R_SetupGL ();
|
R_SetupGL ();
|
||||||
|
|
||||||
|
R_PushDlights (vec3_origin);
|
||||||
|
|
||||||
R_MarkLeaves (); // done here so we know if we're in water
|
R_MarkLeaves (); // done here so we know if we're in water
|
||||||
|
|
||||||
R_DrawWorld (); // adds static entities to the list
|
R_DrawWorld (); // adds static entities to the list
|
||||||
|
|
|
@ -690,9 +690,6 @@ V_RenderView (void)
|
||||||
V_CalcRefdef ();
|
V_CalcRefdef ();
|
||||||
}
|
}
|
||||||
|
|
||||||
// nq thinks dlights should be here
|
|
||||||
R_PushDlights (vec3_origin);
|
|
||||||
|
|
||||||
R_RenderView ();
|
R_RenderView ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -471,13 +471,13 @@ CL_Disconnect (void)
|
||||||
|
|
||||||
VID_SetCaption ("Disconnected");
|
VID_SetCaption ("Disconnected");
|
||||||
|
|
||||||
// stop sounds (especially looping!)
|
// stop sounds (especially looping!)
|
||||||
S_StopAllSounds (true);
|
S_StopAllSounds (true);
|
||||||
|
|
||||||
// Clean the Cshifts
|
// Clean the Cshifts
|
||||||
CL_StopCshifts ();
|
CL_StopCshifts ();
|
||||||
|
|
||||||
// if running a local server, shut it down
|
// if running a local server, shut it down
|
||||||
if (cls.demoplayback)
|
if (cls.demoplayback)
|
||||||
CL_StopPlayback ();
|
CL_StopPlayback ();
|
||||||
else if (cls.state != ca_disconnected) {
|
else if (cls.state != ca_disconnected) {
|
||||||
|
|
|
@ -67,7 +67,6 @@
|
||||||
#include "sbar.h"
|
#include "sbar.h"
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
|
|
||||||
extern cvar_t *gl_dlight_polyblend;
|
|
||||||
extern cvar_t *cl_autoexec;
|
extern cvar_t *cl_autoexec;
|
||||||
|
|
||||||
char *svc_strings[] = {
|
char *svc_strings[] = {
|
||||||
|
|
|
@ -1073,7 +1073,7 @@ R_RenderView (void)
|
||||||
R_Clear ();
|
R_Clear ();
|
||||||
|
|
||||||
// render normal view
|
// render normal view
|
||||||
R_SetupFrame (); // Setup stuff for frame.
|
R_SetupFrame ();
|
||||||
|
|
||||||
R_SetFrustum ();
|
R_SetFrustum ();
|
||||||
|
|
||||||
|
@ -1081,13 +1081,11 @@ R_RenderView (void)
|
||||||
|
|
||||||
R_PushDlights (vec3_origin);
|
R_PushDlights (vec3_origin);
|
||||||
|
|
||||||
R_MarkLeaves (); // done here so we know if we're in
|
R_MarkLeaves (); // done here so we know if we're in water
|
||||||
// water
|
|
||||||
|
|
||||||
R_DrawWorld (); // adds static entities to the list
|
R_DrawWorld (); // adds static entities to the list
|
||||||
|
|
||||||
S_ExtraUpdate (); // don't let sound get messed up if
|
S_ExtraUpdate (); // don't let sound get messed up if going slow
|
||||||
// going slow
|
|
||||||
|
|
||||||
R_DrawEntitiesOnList ();
|
R_DrawEntitiesOnList ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue