summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cl_local.h1
-rw-r--r--src/cl_main.c21
-rw-r--r--src/cl_view.c18
3 files changed, 20 insertions, 20 deletions
diff --git a/src/cl_local.h b/src/cl_local.h
index 61e8bb6..3472246 100644
--- a/src/cl_local.h
+++ b/src/cl_local.h
@@ -504,6 +504,7 @@ void V_AddLight (vec3_t org, float intensity, float r, float g, float b);
void V_AddLightStyle (int style, vec4_t value);
#endif
void CL_PrepRefresh (void);
+void CL_UpdateBlendSetting( void );
//
// cl_tent.c
diff --git a/src/cl_main.c b/src/cl_main.c
index f4cb53e..82c0bdb 100644
--- a/src/cl_main.c
+++ b/src/cl_main.c
@@ -135,11 +135,6 @@ static request_t *CL_AddRequest( const netadr_t *adr, requestType_t type ) {
return r;
}
-/*
-===================
-CL_UpdateGunSetting
-===================
-*/
static void CL_UpdateGunSetting( void ) {
int nogun;
@@ -164,11 +159,6 @@ static void CL_UpdateGunSetting( void ) {
MSG_FlushTo( &cls.netchan->message );
}
-/*
-===================
-CL_UpdateGibSetting
-===================
-*/
static void CL_UpdateGibSetting( void ) {
if( cls.state < ca_connected ) {
return;
@@ -184,11 +174,6 @@ static void CL_UpdateGibSetting( void ) {
MSG_FlushTo( &cls.netchan->message );
}
-/*
-===================
-CL_UpdateFootstepsSetting
-===================
-*/
static void CL_UpdateFootstepsSetting( void ) {
if( cls.state < ca_connected ) {
return;
@@ -203,11 +188,6 @@ static void CL_UpdateFootstepsSetting( void ) {
MSG_FlushTo( &cls.netchan->message );
}
-/*
-===================
-CL_UpdatePredictSetting
-===================
-*/
static void CL_UpdatePredictSetting( void ) {
if( cls.state < ca_connected ) {
return;
@@ -2020,6 +2000,7 @@ void CL_RequestNextDownload ( void ) {
Cvar_FixCheats();
CL_UpdateGunSetting();
+ CL_UpdateBlendSetting();
CL_UpdateGibSetting();
CL_UpdateFootstepsSetting();
CL_UpdatePredictSetting();
diff --git a/src/cl_view.c b/src/cl_view.c
index 8f8e398..c8cd84c 100644
--- a/src/cl_view.c
+++ b/src/cl_view.c
@@ -351,6 +351,19 @@ void CL_PrepRefresh (void) {
SCR_UpdateScreen ();
}
+void CL_UpdateBlendSetting( void ) {
+ if( cls.state < ca_connected ) {
+ return;
+ }
+ if( cls.serverProtocol < PROTOCOL_VERSION_R1Q2 ) {
+ return;
+ }
+
+ MSG_WriteByte( clc_setting );
+ MSG_WriteShort( CLS_NOBLEND );
+ MSG_WriteShort( !cl_add_blend->integer );
+ MSG_FlushTo( &cls.netchan->message );
+}
//============================================================================
@@ -557,6 +570,10 @@ static const cmdreg_t v_cmds[] = {
{ NULL }
};
+static void cl_add_blend_changed( cvar_t *self ) {
+ CL_UpdateBlendSetting();
+}
+
/*
=============
V_Init
@@ -582,6 +599,7 @@ void V_Init( void ) {
cl_add_particles = Cvar_Get ( "cl_particles", "1", 0 );
cl_add_entities = Cvar_Get ( "cl_entities", "1", 0 );
cl_add_blend = Cvar_Get ( "cl_blend", "1", CVAR_ARCHIVE );
+ cl_add_blend->changed = cl_add_blend_changed;
}
void V_Shutdown( void ) {