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 "quakedef.h"
#include "pmove.h" #include "pmove.h"
#include "view.h" #include "view.h"
#include "teamplay.h"
extern cvar_t *cl_predict_players; extern cvar_t *cl_predict_players;
extern cvar_t *cl_predict_players2; extern cvar_t *cl_predict_players2;
@ -488,6 +489,8 @@ void CL_LinkPacketEntities (void)
int i; int i;
int pnum; int pnum;
dlight_t *dl; 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; pack = &cl.frames[cls.netchan.incoming_sequence&UPDATE_MASK].packet_entities;
@ -516,6 +519,15 @@ void CL_LinkPacketEntities (void)
if (!s1->modelindex) if (!s1->modelindex)
continue; 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 // create a new entity
if (cl_numvisedicts == MAX_VISEDICTS) if (cl_numvisedicts == MAX_VISEDICTS)
break; // object list is full break; // object list is full

View file

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

View file

@ -132,6 +132,7 @@ int parsecountmod;
double parsecounttime; double parsecounttime;
int cl_spikeindex, cl_playerindex, cl_flagindex; 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_playerindex = -1;
cl_spikeindex = -1; cl_spikeindex = -1;
cl_flagindex = -1; cl_flagindex = -1;
cl_h_playerindex = -1;
cl_gib1index = cl_gib2index = cl_gib3index = -1;
MSG_WriteByte (&cls.netchan.message, clc_stringcmd); 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 %i 0", cl.servercount));
MSG_WriteString (&cls.netchan.message, va(modellist_name, cl.servercount, 0)); 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")) if (!strcmp(cl.model_name[nummodels],"progs/spike.mdl"))
cl_spikeindex = nummodels; 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; 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; 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(); n = MSG_ReadByte();