cl_deadbodyfilter and cl_gibfilter should work now.

This commit is contained in:
Anton E. Gavrilov 2000-08-02 23:00:39 +00:00
parent ca442eb9e8
commit bfcee99717
3 changed files with 28 additions and 2 deletions

View File

@ -43,6 +43,7 @@
#include "quakedef.h"
#include "pmove.h"
#include "view.h"
#include "teamplay.h"
extern cvar_t *cl_predict_players;
extern cvar_t *cl_predict_players2;
@ -488,6 +489,8 @@ void CL_LinkPacketEntities (void)
int i;
int pnum;
dlight_t *dl;
extern int cl_playerindex;
extern int cl_h_playerindex, cl_gib1index, cl_gib2index, cl_gib3index;
pack = &cl.frames[cls.netchan.incoming_sequence&UPDATE_MASK].packet_entities;
@ -516,6 +519,15 @@ void CL_LinkPacketEntities (void)
if (!s1->modelindex)
continue;
// Hack hack hack
if (cl_deadbodyfilter->value && s1->modelindex == cl_playerindex
&& ( (i=s1->frame)==49 || i==60 || i==69 || i==84 || i==93 || i==102) )
continue;
if (cl_gibfilter->value &&
(s1->modelindex == cl_h_playerindex || s1->modelindex == cl_gib1index
|| s1->modelindex == cl_gib2index || s1->modelindex == cl_gib3index))
continue;
// create a new entity
if (cl_numvisedicts == MAX_VISEDICTS)
break; // object list is full

View File

@ -58,6 +58,7 @@
#include "draw.h"
#include "qargs.h"
#include "cdaudio.h"
#include "teamplay.h"
#ifdef __sun
/* Sun's model_t in sys/model.h conflicts w/ Quake's model_t */
@ -1554,6 +1555,7 @@ void Host_Init (quakeparms_t *parms)
SCR_InitCvars ();
VID_InitCvars ();
COM_Init ();
CL_InitTeamplay ();
// reparse the command line for + commands other than set
// (sets still done, but it doesn't matter)

View File

@ -132,6 +132,7 @@ int parsecountmod;
double parsecounttime;
int cl_spikeindex, cl_playerindex, cl_flagindex;
int cl_h_playerindex, cl_gib1index, cl_gib2index, cl_gib3index;
//=============================================================================
@ -317,6 +318,8 @@ void Sound_NextDownload (void)
cl_playerindex = -1;
cl_spikeindex = -1;
cl_flagindex = -1;
cl_h_playerindex = -1;
cl_gib1index = cl_gib2index = cl_gib3index = -1;
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
// MSG_WriteString (&cls.netchan.message, va("modellist %i 0", cl.servercount));
MSG_WriteString (&cls.netchan.message, va(modellist_name, cl.servercount, 0));
@ -735,10 +738,19 @@ void CL_ParseModellist (void)
if (!strcmp(cl.model_name[nummodels],"progs/spike.mdl"))
cl_spikeindex = nummodels;
if (!strcmp(cl.model_name[nummodels],"progs/player.mdl"))
else if (!strcmp(cl.model_name[nummodels],"progs/player.mdl"))
cl_playerindex = nummodels;
if (!strcmp(cl.model_name[nummodels],"progs/flag.mdl"))
else if (!strcmp(cl.model_name[nummodels],"progs/flag.mdl"))
cl_flagindex = nummodels;
// for deadbodyfilter &gibfilter
else if (!strcmp(cl.model_name[nummodels],"progs/h_player.mdl"))
cl_h_playerindex = nummodels;
else if (!strcmp(cl.model_name[nummodels],"progs/gib1.mdl"))
cl_gib1index = nummodels;
else if (!strcmp(cl.model_name[nummodels],"progs/gib2.mdl"))
cl_gib2index = nummodels;
else if (!strcmp(cl.model_name[nummodels],"progs/gib3.mdl"))
cl_gib3index = nummodels;
}
n = MSG_ReadByte();