Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion cl_dll/entity.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 1996-2002, Valve LLC, All rights reserved. ============
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
//
// Purpose:
//
Expand Down Expand Up @@ -64,6 +64,14 @@ int DLLEXPORT HUD_AddEntity( int type, struct cl_entity_s *ent, const char *mode
default:
break;
}

if (gHUD.m_pCvarFixStandingCorpses->value > 0
&& (ent->player || ent->curstate.renderfx == kRenderFxDeadPlayer) && ent->curstate.framerate == 0)
ent->curstate.frame = 255;

if (gHUD.m_pCvarHideCorpses->value > 0 && ent->curstate.renderfx == kRenderFxDeadPlayer)
return 0;

// each frame every entity passes this function, so the overview hooks it to filter the overview entities
// in spectator mode:
// each frame every entity passes this function, so the overview hooks
Expand Down
2 changes: 2 additions & 0 deletions cl_dll/hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ void CHud :: Init( void )
CVAR_CREATE( "cl_forceteammatescolors", "", FCVAR_ARCHIVE );
m_pCvarBunnyHop = CVAR_CREATE( "cl_bunnyhop", "1", 0 ); // controls client-side bunnyhop enabling
CVAR_CREATE( "cl_autowepswitch", "1", FCVAR_ARCHIVE | FCVAR_USERINFO ); // controls autoswitching to best weapon on pickup
m_pCvarHideCorpses = CVAR_CREATE("cl_hidecorpses", "0", FCVAR_ARCHIVE);
m_pCvarFixStandingCorpses = CVAR_CREATE("cl_fix_standing_corpses", "0", FCVAR_ARCHIVE);

default_fov = CVAR_CREATE( "default_fov", "90", 0 );
m_pCvarStealMouse = CVAR_CREATE( "hud_capturemouse", "1", FCVAR_ARCHIVE );
Expand Down
2 changes: 2 additions & 0 deletions cl_dll/hud.h
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,8 @@ class CHud
cvar_t *m_pCvarShowSteamId;
cvar_t *m_pCvarColorText;
cvar_t *m_pCvarRDynamicEntLight;
cvar_t *m_pCvarHideCorpses;
cvar_t *m_pCvarFixStandingCorpses;

int m_iFontHeight;
int DrawHudNumber(int x, int y, int iFlags, int iNumber, int r, int g, int b );
Expand Down