mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +00:00
Fix up the watervis stuff. Whoops! :)
This commit is contained in:
parent
13071a2d23
commit
7c134a6f95
6 changed files with 17 additions and 14 deletions
|
@ -322,8 +322,8 @@ R_Init_Cvars (void)
|
||||||
"time and statistics of what is being viewed");
|
"time and statistics of what is being viewed");
|
||||||
r_timegraph = Cvar_Get ("r_timegraph", "0", CVAR_NONE, NULL,
|
r_timegraph = Cvar_Get ("r_timegraph", "0", CVAR_NONE, NULL,
|
||||||
"Toggle the display of a performance graph");
|
"Toggle the display of a performance graph");
|
||||||
r_wateralpha = Cvar_Get ("r_wateralpha", "1", CVAR_NONE, NULL,
|
r_wateralpha = Cvar_Get ("r_wateralpha", "1", CVAR_ARCHIVE, NULL,
|
||||||
"Determine the opacity of liquids. 1 = solid, "
|
"Determine the opacity of liquids. 1 = opaque, "
|
||||||
"0 = transparent, otherwise translucent.");
|
"0 = transparent, otherwise translucent.");
|
||||||
r_waterripple = Cvar_Get ("r_waterripple", "0", CVAR_NONE, NULL,
|
r_waterripple = Cvar_Get ("r_waterripple", "0", CVAR_NONE, NULL,
|
||||||
"Set to make liquids ripple, try setting to 5");
|
"Set to make liquids ripple, try setting to 5");
|
||||||
|
|
|
@ -47,10 +47,11 @@ static const char rcsid[] =
|
||||||
#include "QF/texture.h"
|
#include "QF/texture.h"
|
||||||
|
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
#include "r_cvar.h"
|
||||||
|
#include "r_local.h"
|
||||||
#include "sbar.h"
|
#include "sbar.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SCR_DrawNet (void)
|
SCR_DrawNet (void)
|
||||||
{
|
{
|
||||||
|
@ -81,6 +82,8 @@ static SCR_Func scr_funcs[] = {
|
||||||
void
|
void
|
||||||
CL_UpdateScreen (double realtime)
|
CL_UpdateScreen (double realtime)
|
||||||
{
|
{
|
||||||
|
cl_wateralpha = r_wateralpha->value;
|
||||||
|
|
||||||
V_PrepBlend ();
|
V_PrepBlend ();
|
||||||
SCR_UpdateScreen (realtime, scr_funcs);
|
SCR_UpdateScreen (realtime, scr_funcs);
|
||||||
}
|
}
|
||||||
|
|
|
@ -660,8 +660,6 @@ _Host_Frame (float time)
|
||||||
r_view_model = &cl.viewent;
|
r_view_model = &cl.viewent;
|
||||||
r_frametime = host_frametime;
|
r_frametime = host_frametime;
|
||||||
|
|
||||||
cl_wateralpha = r_wateralpha->value;
|
|
||||||
|
|
||||||
CL_UpdateScreen (cl.time);
|
CL_UpdateScreen (cl.time);
|
||||||
|
|
||||||
if (host_speeds->int_val)
|
if (host_speeds->int_val)
|
||||||
|
|
|
@ -1550,14 +1550,6 @@ Host_Frame (float time)
|
||||||
r_view_model = &cl.viewent;
|
r_view_model = &cl.viewent;
|
||||||
r_frametime = host_frametime;
|
r_frametime = host_frametime;
|
||||||
|
|
||||||
// don't allow cheats in multiplayer
|
|
||||||
if (r_active) {
|
|
||||||
if (!cl.watervis)
|
|
||||||
cl_wateralpha = r_wateralpha->value;
|
|
||||||
else
|
|
||||||
cl_wateralpha = 1.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
CL_UpdateScreen (realtime);
|
CL_UpdateScreen (realtime);
|
||||||
|
|
||||||
if (host_speeds->int_val)
|
if (host_speeds->int_val)
|
||||||
|
|
|
@ -51,6 +51,8 @@ static const char rcsid[] =
|
||||||
#include "cl_parse.h"
|
#include "cl_parse.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
#include "r_local.h"
|
||||||
|
#include "r_cvar.h"
|
||||||
#include "sbar.h"
|
#include "sbar.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -123,6 +125,14 @@ static SCR_Func scr_funcs[] = {
|
||||||
void
|
void
|
||||||
CL_UpdateScreen (double realtime)
|
CL_UpdateScreen (double realtime)
|
||||||
{
|
{
|
||||||
|
// don't allow cheats in multiplayer
|
||||||
|
if (r_active) {
|
||||||
|
if (cl.watervis)
|
||||||
|
cl_wateralpha = r_wateralpha->value;
|
||||||
|
else
|
||||||
|
cl_wateralpha = 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
V_PrepBlend ();
|
V_PrepBlend ();
|
||||||
SCR_UpdateScreen (realtime, scr_funcs);
|
SCR_UpdateScreen (realtime, scr_funcs);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1994,7 +1994,7 @@ SV_InitLocal (void)
|
||||||
spawn = Cvar_Get ("spawn", "0", CVAR_SERVERINFO, Cvar_Info,
|
spawn = Cvar_Get ("spawn", "0", CVAR_SERVERINFO, Cvar_Info,
|
||||||
"Spawn the player entity");
|
"Spawn the player entity");
|
||||||
watervis = Cvar_Get ("watervis", "0", CVAR_SERVERINFO, Cvar_Info,
|
watervis = Cvar_Get ("watervis", "0", CVAR_SERVERINFO, Cvar_Info,
|
||||||
"Toggle the effectiveness of r_wateralpha on OpenGL clients");
|
"Set nonzero to enable r_wateralpha on clients");
|
||||||
timeout = Cvar_Get ("timeout", "65", CVAR_NONE, NULL, "Sets the amount of "
|
timeout = Cvar_Get ("timeout", "65", CVAR_NONE, NULL, "Sets the amount of "
|
||||||
"time in seconds before a client is considered "
|
"time in seconds before a client is considered "
|
||||||
"disconnected if the server does not receive a "
|
"disconnected if the server does not receive a "
|
||||||
|
|
Loading…
Reference in a new issue