added a zquake/fuhquake cvar: r_drawflame.. r_drawflame 0 will hide torches, even if you have gl_part_flame 1. fps gain

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2052 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Lance 2006-03-05 04:46:10 +00:00
parent 1ed370ac4a
commit 2d44c7b2c9
2 changed files with 42 additions and 26 deletions

View file

@ -82,6 +82,8 @@ cvar_t localid = SCVAR("localid", "");
cvar_t cl_antibunch = SCVAR("cl_antibunch", "0"); cvar_t cl_antibunch = SCVAR("cl_antibunch", "0");
cvar_t r_drawflame = SCVAR("r_drawflame", "1");
static qboolean allowremotecmd = true; static qboolean allowremotecmd = true;
// //
@ -2605,6 +2607,8 @@ void CL_Init (void)
Cvar_Register (&cl_nolerp, "Item effects"); Cvar_Register (&cl_nolerp, "Item effects");
Cvar_Register (&r_drawflame, "Item effects");
Cvar_Register (&allow_download_csprogs, cl_controlgroup); Cvar_Register (&allow_download_csprogs, cl_controlgroup);
// //

View file

@ -258,12 +258,24 @@ void R_StoreEfrags (efrag_t **ppefrag)
efrag_t *pefrag; efrag_t *pefrag;
extern cvar_t gl_part_flame; extern cvar_t gl_part_flame;
extern cvar_t r_drawflame;
while ((pefrag = *ppefrag) != NULL) while ((pefrag = *ppefrag) != NULL)
{ {
pent = pefrag->entity; pent = pefrag->entity;
clmodel = pent->model; clmodel = pent->model;
//if ( (!strcmp(clmodel->name, "progs/flame.mdl")) || (!strcmp(clmodel->name, "progs/flame2.mdl")) && (r_drawflame.value == 0) && (gl_part_flame.value == 0) )
//if ( strcmp(clmodel->name, "progs/flame.mdl") || strcmp(clmodel->name, "progs/flame2.mdl") && (r_drawflame.value == 0) && (gl_part_flame.value == 0) )
//{
// break;
//}
if ( (strcmp(clmodel->name, "progs/flame.mdl")) || (strcmp(clmodel->name, "progs/flame2.mdl")) && (!r_drawflame.value) )
{
return;
}
// switch (clmodel->type) // switch (clmodel->type)
// { // {
// case mod_alias: // case mod_alias:
@ -295,7 +307,7 @@ void R_StoreEfrags (efrag_t **ppefrag)
// break; // break;
// default: // default:
// Sys_Error ("R_StoreEfrags: Bad entity type %d\n", clmodel->type); // Con_Printf ("R_StoreEfrags: Bad entity type %d\n", clmodel->type);
// } // }
} }
} }