From a2386f5a89f9822a71a92ebf5551ce1a5037691c Mon Sep 17 00:00:00 2001 From: a1batross Date: Tue, 29 Mar 2016 21:45:00 +0300 Subject: [PATCH] Add mp_decals, remove archive flag from r_decals. (GS behaviour) --- engine/client/cl_parse.c | 3 +++ engine/client/gl_local.h | 2 ++ engine/client/gl_vidnt_common.c | 4 +++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index 7c7341e3..906c0b4b 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -621,6 +621,9 @@ void CL_ParseServerData( sizebuf_t *msg ) menu.globals->maxClients = cl.maxclients; Q_strncpy( menu.globals->maptitle, clgame.maptitle, sizeof( menu.globals->maptitle )); + if( cl.maxclients > 1 && r_decals->value > mp_decals->value ) + Cvar_SetFloat( "r_decals", mp_decals->value ); + if( !cls.changelevel && !cls.changedemo ) CL_InitEdicts (); // re-arrange edicts diff --git a/engine/client/gl_local.h b/engine/client/gl_local.h index 6ac6cdfa..2a9a927c 100644 --- a/engine/client/gl_local.h +++ b/engine/client/gl_local.h @@ -691,6 +691,8 @@ extern convar_t *r_dynamic; extern convar_t *r_lightmap; extern convar_t *r_fastsky; +extern convar_t *mp_decals; + extern convar_t *vid_displayfrequency; extern convar_t *vid_fullscreen; extern convar_t *vid_gamma; diff --git a/engine/client/gl_vidnt_common.c b/engine/client/gl_vidnt_common.c index daec6485..8a974c99 100644 --- a/engine/client/gl_vidnt_common.c +++ b/engine/client/gl_vidnt_common.c @@ -58,6 +58,7 @@ convar_t *r_lockcull; convar_t *r_dynamic; convar_t *r_lightmap; convar_t *r_fastsky; +convar_t *mp_decals; convar_t *vid_displayfrequency; convar_t *vid_fullscreen; @@ -406,9 +407,10 @@ void GL_InitCommands( void ) r_drawentities = Cvar_Get( "r_drawentities", "1", CVAR_CHEAT|CVAR_ARCHIVE, "render entities" ); r_flaresize = Cvar_Get( "r_flaresize", "200", CVAR_ARCHIVE, "set flares size" ); r_lefthand = Cvar_Get( "hand", "0", CVAR_ARCHIVE, "viewmodel handedness" ); - r_decals = Cvar_Get( "r_decals", "4096", CVAR_ARCHIVE, "sets the maximum number of decals" ); + r_decals = Cvar_Get( "r_decals", "4096", 0, "sets the maximum number of decals" ); r_xpos = Cvar_Get( "r_xpos", "130", CVAR_GLCONFIG, "window position by horizontal" ); r_ypos = Cvar_Get( "r_ypos", "48", CVAR_GLCONFIG, "window position by vertical" ); + mp_decals = Cvar_Get( "mp_decals", "300", CVAR_ARCHIVE, "sets the maximum number of decals in multiplayer" ); gl_picmip = Cvar_Get( "gl_picmip", "0", CVAR_GLCONFIG, "reduces resolution of textures by powers of 2" ); gl_skymip = Cvar_Get( "gl_skymip", "0", CVAR_GLCONFIG, "reduces resolution of skybox textures by powers of 2" );