mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
Gib filters and things.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@811 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
71dd0f167d
commit
18ea868de2
3 changed files with 54 additions and 2 deletions
|
@ -32,6 +32,8 @@ extern cvar_t r_rocketlight;
|
||||||
extern cvar_t r_lightflicker;
|
extern cvar_t r_lightflicker;
|
||||||
extern cvar_t cl_r2g;
|
extern cvar_t cl_r2g;
|
||||||
extern cvar_t r_powerupglow;
|
extern cvar_t r_powerupglow;
|
||||||
|
|
||||||
|
extern cvar_t cl_gibfilter, cl_deadbodyfilter;
|
||||||
extern int cl_playerindex;
|
extern int cl_playerindex;
|
||||||
|
|
||||||
static struct predicted_player {
|
static struct predicted_player {
|
||||||
|
@ -51,7 +53,32 @@ static struct predicted_player {
|
||||||
|
|
||||||
float newlerprate;
|
float newlerprate;
|
||||||
|
|
||||||
extern int cl_rocketindex, cl_grenadeindex;
|
extern int cl_playerindex, cl_h_playerindex, cl_rocketindex, cl_grenadeindex, cl_gib1index, cl_gib2index, cl_gib3index;
|
||||||
|
|
||||||
|
qboolean CL_FilterModelindex(int modelindex, int frame)
|
||||||
|
{
|
||||||
|
if (modelindex == cl_playerindex)
|
||||||
|
{
|
||||||
|
if (cl_deadbodyfilter.value == 2)
|
||||||
|
{
|
||||||
|
if (frame >= 41 && frame <= 102)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (cl_deadbodyfilter.value)
|
||||||
|
{
|
||||||
|
if (frame == 49 || frame == 60 || frame == 69 || frame == 84 || frame == 93 || frame == 102)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cl_gibfilter.value && (
|
||||||
|
modelindex == cl_h_playerindex ||
|
||||||
|
modelindex == cl_gib1index ||
|
||||||
|
modelindex == cl_gib2index ||
|
||||||
|
modelindex == cl_gib3index))
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//============================================================
|
//============================================================
|
||||||
|
|
||||||
|
@ -1284,6 +1311,9 @@ void CL_LinkPacketEntities (void)
|
||||||
if (cl_numvisedicts == MAX_VISEDICTS)
|
if (cl_numvisedicts == MAX_VISEDICTS)
|
||||||
break; // object list is full
|
break; // object list is full
|
||||||
|
|
||||||
|
if (CL_FilterModelindex(s1->modelindex, s1->frame))
|
||||||
|
continue;
|
||||||
|
|
||||||
model = cl.model_precache[s1->modelindex];
|
model = cl.model_precache[s1->modelindex];
|
||||||
if (!model)
|
if (!model)
|
||||||
{
|
{
|
||||||
|
@ -2050,6 +2080,9 @@ void CL_LinkPlayers (void)
|
||||||
|
|
||||||
if (state->modelindex < 1)
|
if (state->modelindex < 1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (CL_FilterModelindex(state->modelindex, state->frame))
|
||||||
|
continue;
|
||||||
/*
|
/*
|
||||||
if (!Cam_DrawPlayer(j))
|
if (!Cam_DrawPlayer(j))
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -111,6 +111,8 @@ cvar_t r_rocketlight = {"r_rocketlight", "1"};
|
||||||
cvar_t r_lightflicker = {"r_lightflicker", "1"};
|
cvar_t r_lightflicker = {"r_lightflicker", "1"};
|
||||||
cvar_t cl_r2g = {"cl_r2g", "0"};
|
cvar_t cl_r2g = {"cl_r2g", "0"};
|
||||||
cvar_t r_powerupglow = {"r_powerupglow", "1"};
|
cvar_t r_powerupglow = {"r_powerupglow", "1"};
|
||||||
|
cvar_t cl_gibfilter = {"cl_gibfilter", "0"};
|
||||||
|
cvar_t cl_deadbodyfilter = {"cl_deadbodyfilter", "0"};
|
||||||
|
|
||||||
cvar_t cl_muzzleflash = {"cl_muzzleflash", "1"};
|
cvar_t cl_muzzleflash = {"cl_muzzleflash", "1"};
|
||||||
|
|
||||||
|
@ -2279,6 +2281,9 @@ void CL_Init (void)
|
||||||
Cvar_Register (&cl_r2g, "Item effects");
|
Cvar_Register (&cl_r2g, "Item effects");
|
||||||
Cvar_Register (&r_powerupglow, "Item effects");
|
Cvar_Register (&r_powerupglow, "Item effects");
|
||||||
|
|
||||||
|
Cvar_Register (&cl_gibfilter, "Item effects");
|
||||||
|
Cvar_Register (&cl_deadbodyfilter, "Item effects");
|
||||||
|
|
||||||
//
|
//
|
||||||
// info mirrors
|
// info mirrors
|
||||||
//
|
//
|
||||||
|
|
|
@ -467,7 +467,7 @@ int oldparsecountmod;
|
||||||
int parsecountmod;
|
int parsecountmod;
|
||||||
double parsecounttime;
|
double parsecounttime;
|
||||||
|
|
||||||
int cl_spikeindex, cl_playerindex, cl_flagindex, cl_rocketindex, cl_grenadeindex;
|
int cl_spikeindex, cl_playerindex, cl_h_playerindex, cl_flagindex, cl_rocketindex, cl_grenadeindex, cl_gib1index, cl_gib2index, cl_gib3index;
|
||||||
|
|
||||||
#ifdef PEXT_LIGHTUPDATES
|
#ifdef PEXT_LIGHTUPDATES
|
||||||
int cl_lightningindex;
|
int cl_lightningindex;
|
||||||
|
@ -919,10 +919,14 @@ void Sound_NextDownload (void)
|
||||||
// done with sounds, request models now
|
// done with sounds, request models now
|
||||||
memset (cl.model_precache, 0, sizeof(cl.model_precache));
|
memset (cl.model_precache, 0, sizeof(cl.model_precache));
|
||||||
cl_playerindex = -1;
|
cl_playerindex = -1;
|
||||||
|
cl_h_playerindex = -1;
|
||||||
cl_spikeindex = -1;
|
cl_spikeindex = -1;
|
||||||
cl_flagindex = -1;
|
cl_flagindex = -1;
|
||||||
cl_rocketindex = -1;
|
cl_rocketindex = -1;
|
||||||
cl_grenadeindex = -1;
|
cl_grenadeindex = -1;
|
||||||
|
cl_gib1index = -1;
|
||||||
|
cl_gib2index = -1;
|
||||||
|
cl_gib3index = -1;
|
||||||
#ifdef PEXT_LIGHTUPDATES
|
#ifdef PEXT_LIGHTUPDATES
|
||||||
cl_lightningindex = -1;
|
cl_lightningindex = -1;
|
||||||
#endif
|
#endif
|
||||||
|
@ -2098,6 +2102,8 @@ void CL_ParseModellist (qboolean lots)
|
||||||
#endif
|
#endif
|
||||||
if (!strcmp(cl.model_name[nummodels],"progs/player.mdl"))
|
if (!strcmp(cl.model_name[nummodels],"progs/player.mdl"))
|
||||||
cl_playerindex = nummodels;
|
cl_playerindex = nummodels;
|
||||||
|
if (!strcmp(cl.model_name[nummodels],"progs/h_player.mdl"))
|
||||||
|
cl_h_playerindex = nummodels;
|
||||||
if (!strcmp(cl.model_name[nummodels],"progs/flag.mdl"))
|
if (!strcmp(cl.model_name[nummodels],"progs/flag.mdl"))
|
||||||
cl_flagindex = nummodels;
|
cl_flagindex = nummodels;
|
||||||
|
|
||||||
|
@ -2105,6 +2111,14 @@ void CL_ParseModellist (qboolean lots)
|
||||||
cl_rocketindex = nummodels;
|
cl_rocketindex = nummodels;
|
||||||
if (!strcmp(cl.model_name[nummodels],"progs/grenade.mdl"))
|
if (!strcmp(cl.model_name[nummodels],"progs/grenade.mdl"))
|
||||||
cl_grenadeindex = nummodels;
|
cl_grenadeindex = nummodels;
|
||||||
|
|
||||||
|
|
||||||
|
if (!strcmp(cl.model_name[nummodels],"progs/gib1.mdl"))
|
||||||
|
cl_gib1index = nummodels;
|
||||||
|
if (!strcmp(cl.model_name[nummodels],"progs/gib2.mdl"))
|
||||||
|
cl_gib2index = nummodels;
|
||||||
|
if (!strcmp(cl.model_name[nummodels],"progs/gib3.mdl"))
|
||||||
|
cl_gib3index = nummodels;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nummodels)
|
if (nummodels)
|
||||||
|
|
Loading…
Reference in a new issue