From d8812d8220ccaa6ae1fd7b7e735c50b8262b8b20 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 2 Aug 2002 15:07:43 +0000 Subject: [PATCH] added cl_explosions and cl_stainmaps cvars, which will be used soon... renamed cl_draweffects to r_draweffects and made it actually work git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2165 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_main.c | 11 ++++++++--- client.h | 5 +++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cl_main.c b/cl_main.c index f64a4e05..d25fd390 100644 --- a/cl_main.c +++ b/cl_main.c @@ -48,7 +48,10 @@ cvar_t m_side = {CVAR_SAVE, "m_side","0.8"}; cvar_t freelook = {CVAR_SAVE, "freelook", "1"}; -cvar_t cl_draweffects = {0, "cl_draweffects", "1"}; +cvar_t r_draweffects = {0, "r_draweffects", "1"}; + +cvar_t cl_explosions = {CVAR_SAVE, "cl_explosions", "1"}; +cvar_t cl_stainmaps = {CVAR_SAVE, "cl_stainmaps", "1"}; mempool_t *cl_scores_mempool; mempool_t *cl_refdef_mempool; @@ -689,7 +692,7 @@ static void CL_RelinkEffects() e->frame2time = cl.time; } - if ((vis = CL_NewTempEntity())) + if (r_draweffects.integer && (vis = CL_NewTempEntity())) { // interpolation stuff vis->render.frame1 = intframe; @@ -970,7 +973,9 @@ void CL_Init (void) if (gamemode == GAME_NEHAHRA) Cmd_AddCommand ("pmodel", CL_PModel_f); - Cvar_RegisterVariable(&cl_draweffects); + Cvar_RegisterVariable(&r_draweffects); + Cvar_RegisterVariable(&cl_explosions); + Cvar_RegisterVariable(&cl_stainmaps); CL_Parse_Init(); CL_Particles_Init(); diff --git a/client.h b/client.h index 99a85af3..278bd92e 100644 --- a/client.h +++ b/client.h @@ -374,6 +374,11 @@ extern cvar_t m_yaw; extern cvar_t m_forward; extern cvar_t m_side; +extern cvar_t r_draweffects; + +extern cvar_t cl_explosions; +extern cvar_t cl_stainmaps; + // LordHavoc: raised these from 64 and 128 to 512 and 256 #define MAX_TEMP_ENTITIES 512 // lightning bolts, effects, etc -- 2.39.2