From a3209dc8e67ffbb68697d34a97c2ccd48a37675d Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin Date: Sun, 17 May 2020 04:37:18 +0500 Subject: [PATCH] Rework pain and death vision drawing code. --- cl_dll/health.cpp | 48 ++------- cl_dll/health.h | 15 ++- cl_dll/hud.cpp | 2 - cl_dll/hud.h | 22 +---- cl_dll/hud_redraw.cpp | 5 - cl_dll/noffice/cinematic.cpp | 27 +----- cl_dll/noffice/deathvision.cpp | 83 ++-------------- cl_dll/noffice/pain.cpp | 172 ++++++--------------------------- cl_dll/tri.cpp | 36 +++++-- dlls/player.cpp | 9 -- 10 files changed, 90 insertions(+), 329 deletions(-) diff --git a/cl_dll/health.cpp b/cl_dll/health.cpp index 10f660a0..0e15795c 100644 --- a/cl_dll/health.cpp +++ b/cl_dll/health.cpp @@ -104,11 +104,6 @@ int CHudHealth::VidInit( void ) m_iHeight = m_prc2->bottom - m_prc1->top; - m_hPainFront = LoadSprite( "sprites/pain_front.spr" ); - m_hPainLeft = LoadSprite( "sprites/pain_left.spr" ); - m_hPainRight = LoadSprite( "sprites/pain_right.spr" ); - m_hPainRear = LoadSprite( "sprites/pain_rear.spr" ); - return 1; } @@ -179,6 +174,9 @@ void CHudHealth::GetPainColor( int &r, int &g, int &b ) r = 255 - g; b = 0; #else + if( m_iHealth <= 0 ) + DrawDeathVision(); + if( m_iHealth > 25 ) { UnpackRGB( r, g, b, RGB_WHITEISH ); @@ -301,7 +299,8 @@ int CHudHealth::Draw( float flTime ) } DrawDamage( flTime ); - return 1; + + return DrawPain( flTime ); } void CHudHealth::CalcDamageDirection( vec3_t vecFrom ) @@ -377,28 +376,14 @@ int CHudHealth::DrawPain( float flTime ) // SPR_Draw top if( m_fAttackFront > 0.4f ) { - GetPainColor( r, g, b ); - shade = a * Q_max( m_fAttackFront, 0.5f ); - ScaleColors( r, g, b, shade ); - SPR_Set( m_hSprite, r, g, b ); - - x = ScreenWidth / 2 - SPR_Width( m_hSprite, 0 ) / 2; - y = ScreenHeight / 2 - SPR_Height( m_hSprite, 0 ) * 3; - SPR_DrawAdditive( 0, x, y, NULL ); + DrawPainFront(); m_fAttackFront = Q_max( 0, m_fAttackFront - fFade ); } else m_fAttackFront = 0; if( m_fAttackRight > 0.4f ) { - GetPainColor( r, g, b ); - shade = a * Q_max( m_fAttackRight, 0.5f ); - ScaleColors( r, g, b, shade ); - SPR_Set( m_hSprite, r, g, b ); - - x = ScreenWidth / 2 + SPR_Width( m_hSprite, 1 ) * 2; - y = ScreenHeight / 2 - SPR_Height( m_hSprite,1 ) / 2; - SPR_DrawAdditive( 1, x, y, NULL ); + DrawPainRight(); m_fAttackRight = Q_max( 0, m_fAttackRight - fFade ); } else @@ -406,14 +391,7 @@ int CHudHealth::DrawPain( float flTime ) if( m_fAttackRear > 0.4f ) { - GetPainColor( r, g, b ); - shade = a * Q_max( m_fAttackRear, 0.5f ); - ScaleColors( r, g, b, shade ); - SPR_Set( m_hSprite, r, g, b ); - - x = ScreenWidth / 2 - SPR_Width( m_hSprite, 2 ) / 2; - y = ScreenHeight / 2 + SPR_Height( m_hSprite, 2 ) * 2; - SPR_DrawAdditive( 2, x, y, NULL ); + DrawPainRear(); m_fAttackRear = Q_max( 0, m_fAttackRear - fFade ); } else @@ -421,15 +399,7 @@ int CHudHealth::DrawPain( float flTime ) if( m_fAttackLeft > 0.4f ) { - GetPainColor( r, g, b ); - shade = a * Q_max( m_fAttackLeft, 0.5f ); - ScaleColors( r, g, b, shade ); - SPR_Set( m_hSprite, r, g, b ); - - x = ScreenWidth / 2 - SPR_Width( m_hSprite, 3 ) * 3; - y = ScreenHeight / 2 - SPR_Height( m_hSprite,3 ) / 2; - SPR_DrawAdditive( 3, x, y, NULL ); - + DrawPainLeft(); m_fAttackLeft = Q_max( 0, m_fAttackLeft - fFade ); } else m_fAttackLeft = 0; diff --git a/cl_dll/health.h b/cl_dll/health.h index 00b3b601..b9c2c171 100644 --- a/cl_dll/health.h +++ b/cl_dll/health.h @@ -113,18 +113,22 @@ public: float m_fAttackFront, m_fAttackRear, m_fAttackLeft, m_fAttackRight; void GetPainColor( int &r, int &g, int &b ); float m_fFade; - void DrawPain2( void ); private: HSPRITE m_hSprite; HSPRITE m_hDamage; - + DAMAGE_IMAGE m_dmg[NUM_DMG_TYPES]; int m_bitsDamage; int DrawPain( float fTime ); int DrawDamage( float fTime ); void CalcDamageDirection( vec3_t vecFrom ); void UpdateTiles( float fTime, long bits ); + void DrawPainFront(); + void DrawPainRear(); + void DrawPainLeft(); + void DrawPainRight(); + void DrawDeathVision(); HSPRITE m_hSprite1; HSPRITE m_hSprite2; @@ -136,5 +140,12 @@ private: HSPRITE m_hPainLeft; HSPRITE m_hPainRight; HSPRITE m_hPainRear; + HSPRITE m_hDeathVision; + struct model_s *m_hPainFrontModel; + struct model_s *m_hPainRearModel; + struct model_s *m_hPainLeftModel; + struct model_s *m_hPainRightModel; + struct model_s *m_hDeathVisionModel; }; #endif // HEALTH_H + diff --git a/cl_dll/hud.cpp b/cl_dll/hud.cpp index 0947cb1e..692ea279 100644 --- a/cl_dll/hud.cpp +++ b/cl_dll/hud.cpp @@ -232,7 +232,6 @@ void CHud::Init( void ) m_AmmoSecondary.Init(); m_TextMessage.Init(); m_StatusIcons.Init(); - m_DeathVision.Init(); m_MOTD.Init(); m_Scoreboard.Init(); @@ -414,7 +413,6 @@ void CHud::VidInit( void ) m_AmmoSecondary.VidInit(); m_TextMessage.VidInit(); m_StatusIcons.VidInit(); - m_DeathVision.VidInit(); m_Scoreboard.VidInit(); m_MOTD.VidInit(); } diff --git a/cl_dll/hud.h b/cl_dll/hud.h index 3518cc25..e3afc9ea 100644 --- a/cl_dll/hud.h +++ b/cl_dll/hud.h @@ -562,23 +562,6 @@ private: icon_sprite_t m_IconList[MAX_ICONSPRITES]; }; -// -//----------------------------------------------------- -// -class CHudDeathVision : public CHudBase -{ -public: - int Init( void ); - int VidInit( void ); - int Draw( float flTime ); - int MsgFunc_DeathVision( const char *pszName, int iSize, void *pbuf ); - - void DrawDeathVision( void ); - -private: - HSPRITE m_hSprite; -}; - // //----------------------------------------------------- // @@ -656,7 +639,6 @@ public: CHudAmmoSecondary m_AmmoSecondary; CHudTextMessage m_TextMessage; CHudStatusIcons m_StatusIcons; - CHudDeathVision m_DeathVision; CHudScoreboard m_Scoreboard; CHudMOTD m_MOTD; @@ -703,4 +685,8 @@ extern int g_iTeamNumber; extern int g_iUser1; extern int g_iUser2; extern int g_iUser3; + +void HUD_DrawRectangle( struct model_s *hSpriteModel, int mode ); + #endif + diff --git a/cl_dll/hud_redraw.cpp b/cl_dll/hud_redraw.cpp index ec9faec5..08ed74b4 100644 --- a/cl_dll/hud_redraw.cpp +++ b/cl_dll/hud_redraw.cpp @@ -80,8 +80,6 @@ void CHud::Think( void ) } } -void HUD_DrawOrthoTriangles( void ); - // Redraw // step through the local data, placing the appropriate graphics & text as appropriate // returns 1 if they've changed, 0 otherwise @@ -136,9 +134,6 @@ int CHud::Redraw( float flTime, int intermission ) } } - //omega;draw orthogonal triangles - HUD_DrawOrthoTriangles(); - // are we in demo mode? do we need to draw the logo in the top corner? if( m_iLogo ) { diff --git a/cl_dll/noffice/cinematic.cpp b/cl_dll/noffice/cinematic.cpp index a9763d00..44c4214e 100644 --- a/cl_dll/noffice/cinematic.cpp +++ b/cl_dll/noffice/cinematic.cpp @@ -28,8 +28,6 @@ #include "event_args.h" #include "triangleapi.h" -#include "parsemsg.h" - void CHudMessage::DrawCinematic() { if( !m_hSprite ) @@ -38,29 +36,6 @@ void CHudMessage::DrawCinematic() m_hSpriteModel = (struct model_s *)gEngfuncs.GetSpritePointer( m_hSprite ); } - gEngfuncs.pTriAPI->RenderMode( kRenderTransAlpha ); - gEngfuncs.pTriAPI->SpriteTexture( m_hSpriteModel, 0 ); - gEngfuncs.pTriAPI->Color4f( 1.0f, 1.0f, 1.0f, 1.0f ); - gEngfuncs.pTriAPI->CullFace( TRI_NONE ); - gEngfuncs.pTriAPI->Begin( TRI_QUADS ); - - // top right - gEngfuncs.pTriAPI->TexCoord2f( 0.0f, 1.0f ); - gEngfuncs.pTriAPI->Vertex3f( 0, 0, 0 ); - - // top left - gEngfuncs.pTriAPI->TexCoord2f( 0.0f, 0.0f ); - gEngfuncs.pTriAPI->Vertex3f( 0, ScreenHeight, 0 ); - - // bottom left - gEngfuncs.pTriAPI->TexCoord2f( 1.0f, 0.0f ); - gEngfuncs.pTriAPI->Vertex3f( ScreenWidth, ScreenHeight, 0 ); - - // bottom right - gEngfuncs.pTriAPI->TexCoord2f( 1.0f, 1.0f ); - gEngfuncs.pTriAPI->Vertex3f( ScreenWidth, 0, 0 ); - - gEngfuncs.pTriAPI->End(); //end our list of vertexes - gEngfuncs.pTriAPI->RenderMode( kRenderNormal ); //return to normal + HUD_DrawRectangle( m_hSpriteModel, kRenderTransAlpha ); } diff --git a/cl_dll/noffice/deathvision.cpp b/cl_dll/noffice/deathvision.cpp index 0f2f529e..916e2999 100644 --- a/cl_dll/noffice/deathvision.cpp +++ b/cl_dll/noffice/deathvision.cpp @@ -23,82 +23,13 @@ #include "event_args.h" #include "triangleapi.h" -#include "parsemsg.h" - -DECLARE_MESSAGE(m_DeathVision, DeathVision) - -int CHudDeathVision::Init(void) -{ - HOOK_MESSAGE(DeathVision); - - m_iFlags = 0; - m_hSprite = 0; - - gHUD.AddHudElem(this); - - return 1; -}; - -int CHudDeathVision::VidInit(void) -{ - m_iFlags = 0; - - m_hSprite = SPR_Load("sprites/death_vision.spr"); - - return 1; -}; - -int CHudDeathVision::MsgFunc_DeathVision(const char *pszName, int iSize, void *pbuf) -{ - m_iFlags |= HUD_ACTIVE; - - BEGIN_READ(pbuf, iSize); - READ_BYTE(); - - return 1; -} - -int CHudDeathVision::Draw(float flTime) +void CHudHealth::DrawDeathVision() { - return 1; -} - -void CHudDeathVision::DrawDeathVision(void) -{ - if (gHUD.m_iHideHUDDisplay & HIDEHUD_ALL) - return; - - if (!(m_iFlags & HUD_ACTIVE)) - return; - - if (!m_hSprite) - m_hSprite = SPR_Load("sprites/death_vision.spr"); - - struct model_s * hSpriteModel = (struct model_s *)gEngfuncs.GetSpritePointer(m_hSprite); - - gEngfuncs.pTriAPI->RenderMode(kRenderTransAdd); - gEngfuncs.pTriAPI->CullFace(TRI_NONE); - gEngfuncs.pTriAPI->SpriteTexture(hSpriteModel, 0); - gEngfuncs.pTriAPI->Begin(TRI_QUADS); - - //top left - gEngfuncs.pTriAPI->TexCoord2f(0.0f, 0.0f); - gEngfuncs.pTriAPI->Vertex3f(0, 0, 0); - - //bottom left - gEngfuncs.pTriAPI->TexCoord2f(0.0f, 1.0f); - gEngfuncs.pTriAPI->Vertex3f(0, ScreenHeight, 0); - - //bottom right - gEngfuncs.pTriAPI->TexCoord2f(1.0f, 1.0f); - gEngfuncs.pTriAPI->Vertex3f(ScreenWidth, ScreenHeight, 0); - - //top right - gEngfuncs.pTriAPI->TexCoord2f(1.0f, 0.0f); - gEngfuncs.pTriAPI->Vertex3f(ScreenWidth, 0, 0); - - gEngfuncs.pTriAPI->End(); //end our list of vertexes - gEngfuncs.pTriAPI->RenderMode(kRenderNormal); //return to normal + if( !m_hDeathVision ) + { + m_hDeathVision = SPR_Load( "sprites/death_vision.spr" ); + m_hDeathVisionModel = (struct model_s *)gEngfuncs.GetSpritePointer( m_hDeathVision ); + } - return; + HUD_DrawRectangle( m_hDeathVisionModel, kRenderTransAdd ); } diff --git a/cl_dll/noffice/pain.cpp b/cl_dll/noffice/pain.cpp index a07e7a61..eca4db39 100644 --- a/cl_dll/noffice/pain.cpp +++ b/cl_dll/noffice/pain.cpp @@ -30,8 +30,6 @@ #include "com_model.h" #include "studio_util.h" -#include "parsemsg.h" - // ========================================== // Code changes for- Night at the Office: // ========================================== @@ -40,157 +38,47 @@ // the side of the screen will be white. If shot from the right, // the right side of the screen will flash white. etc. -void CHudHealth::DrawPain2(void) +void CHudHealth::DrawPainFront() { - if (!(m_fAttackFront || m_fAttackRear || m_fAttackLeft || m_fAttackRight)) - return; - - int a, shade; - - // TODO: get the shift value of the health - a = 255; // max brightness until then - - float fFade = gHUD.m_flTimeDelta * 2; - - gEngfuncs.pTriAPI->RenderMode(kRenderTransAdd); //additive - gEngfuncs.pTriAPI->CullFace(TRI_NONE); //no culling - - // SPR_Draw top - if (m_fAttackFront > 0.4) + if( !m_hPainFront ) { - if (!m_hPainFront) - m_hPainFront = SPR_Load("sprites/pain_front.spr"); - - shade = a * Q_max(m_fAttackFront, 0.5); - - gEngfuncs.pTriAPI->SpriteTexture((struct model_s *) gEngfuncs.GetSpritePointer(m_hPainFront), 0); - gEngfuncs.pTriAPI->Color4f(1, 1, 1, shade); - gEngfuncs.pTriAPI->Begin(TRI_QUADS); - - //top left - gEngfuncs.pTriAPI->TexCoord2f(0.0f, 0.0f); - gEngfuncs.pTriAPI->Vertex3f(0, 0, 0); - - //bottom left - gEngfuncs.pTriAPI->TexCoord2f(0.0f, 1.0f); - gEngfuncs.pTriAPI->Vertex3f(0, ScreenHeight, 0); - - //bottom right - gEngfuncs.pTriAPI->TexCoord2f(1.0f, 1.0f); - gEngfuncs.pTriAPI->Vertex3f(ScreenWidth, ScreenHeight, 0); - - //top right - gEngfuncs.pTriAPI->TexCoord2f(1.0f, 0.0f); - gEngfuncs.pTriAPI->Vertex3f(ScreenWidth, 0, 0); - - gEngfuncs.pTriAPI->End(); - - m_fAttackFront = Q_max(0, m_fAttackFront - fFade); + m_hPainFront = SPR_Load( "sprites/pain_front.spr" ); + m_hPainFrontModel = (struct model_s *)gEngfuncs.GetSpritePointer( m_hPainFront ); } - else - m_fAttackFront = 0; - - if (m_fAttackRight > 0.4) - { - if (!m_hPainRight) - m_hPainRight = SPR_Load("sprites/pain_right.spr"); - - shade = a * Q_max(m_fAttackRight, 0.5); - - gEngfuncs.pTriAPI->SpriteTexture((struct model_s *) gEngfuncs.GetSpritePointer(m_hPainRight), 0); - gEngfuncs.pTriAPI->Color4f(1, 1, 1, shade); - gEngfuncs.pTriAPI->Begin(TRI_QUADS); - //top left - gEngfuncs.pTriAPI->TexCoord2f(0.0f, 0.0f); - gEngfuncs.pTriAPI->Vertex3f(0, 0, 0); - - //bottom left - gEngfuncs.pTriAPI->TexCoord2f(0.0f, 1.0f); - gEngfuncs.pTriAPI->Vertex3f(0, ScreenHeight, 0); - - //bottom right - gEngfuncs.pTriAPI->TexCoord2f(1.0f, 1.0f); - gEngfuncs.pTriAPI->Vertex3f(ScreenWidth, ScreenHeight, 0); - - //top right - gEngfuncs.pTriAPI->TexCoord2f(1.0f, 0.0f); - gEngfuncs.pTriAPI->Vertex3f(ScreenWidth, 0, 0); - - gEngfuncs.pTriAPI->End(); - - m_fAttackRight = Q_max(0, m_fAttackRight - fFade); - } - else - m_fAttackRight = 0; + HUD_DrawRectangle( m_hPainFrontModel, kRenderTransAdd ); +} - if (m_fAttackRear > 0.4) +void CHudHealth::DrawPainRight() +{ + if( !m_hPainRight ) { - if (!m_hPainRear) - m_hPainRear = SPR_Load("sprites/pain_rear.spr"); - - shade = a * Q_max(m_fAttackRear, 0.5); - - gEngfuncs.pTriAPI->SpriteTexture((struct model_s *) gEngfuncs.GetSpritePointer(m_hPainRear), 0); - gEngfuncs.pTriAPI->Color4f(1, 1, 1, shade); - gEngfuncs.pTriAPI->Begin(TRI_QUADS); - - //top left - gEngfuncs.pTriAPI->TexCoord2f(0.0f, 0.0f); - gEngfuncs.pTriAPI->Vertex3f(0, 0, 0); - - //bottom left - gEngfuncs.pTriAPI->TexCoord2f(0.0f, 1.0f); - gEngfuncs.pTriAPI->Vertex3f(0, ScreenHeight, 0); - - //bottom right - gEngfuncs.pTriAPI->TexCoord2f(1.0f, 1.0f); - gEngfuncs.pTriAPI->Vertex3f(ScreenWidth, ScreenHeight, 0); - - //top right - gEngfuncs.pTriAPI->TexCoord2f(1.0f, 0.0f); - gEngfuncs.pTriAPI->Vertex3f(ScreenWidth, 0, 0); - - gEngfuncs.pTriAPI->End(); - - m_fAttackRear = Q_max(0, m_fAttackRear - fFade); + m_hPainRight = SPR_Load( "sprites/pain_right.spr" ); + m_hPainRightModel = (struct model_s *)gEngfuncs.GetSpritePointer( m_hPainRight ); } - else - m_fAttackRear = 0; - - if (m_fAttackLeft > 0.4) - { - if (!m_hPainLeft) - m_hPainLeft = SPR_Load("sprites/pain_left.spr"); - shade = a * Q_max(m_fAttackLeft, 0.5); - - gEngfuncs.pTriAPI->SpriteTexture((struct model_s *) gEngfuncs.GetSpritePointer(m_hPainLeft), 0); - gEngfuncs.pTriAPI->Color4f(1, 1, 1, shade); - gEngfuncs.pTriAPI->Begin(TRI_QUADS); - - //top left - gEngfuncs.pTriAPI->TexCoord2f(0.0f, 0.0f); - gEngfuncs.pTriAPI->Vertex3f(0, 0, 0); - - //bottom left - gEngfuncs.pTriAPI->TexCoord2f(0.0f, 1.0f); - gEngfuncs.pTriAPI->Vertex3f(0, ScreenHeight, 0); - - //bottom right - gEngfuncs.pTriAPI->TexCoord2f(1.0f, 1.0f); - gEngfuncs.pTriAPI->Vertex3f(ScreenWidth, ScreenHeight, 0); + HUD_DrawRectangle( m_hPainRightModel, kRenderTransAdd ); +} - //top right - gEngfuncs.pTriAPI->TexCoord2f(1.0f, 0.0f); - gEngfuncs.pTriAPI->Vertex3f(ScreenWidth, 0, 0); +void CHudHealth::DrawPainLeft() +{ + if( !m_hPainLeft ) + { + m_hPainLeft = SPR_Load( "sprites/pain_front.spr" ); + m_hPainLeftModel = (struct model_s *)gEngfuncs.GetSpritePointer( m_hPainLeft ); + } - gEngfuncs.pTriAPI->End(); + HUD_DrawRectangle( m_hPainLeftModel, kRenderTransAdd ); +} - m_fAttackLeft = Q_max(0, m_fAttackLeft - fFade); +void CHudHealth::DrawPainRear() +{ + if( !m_hPainRear ) + { + m_hPainRear = SPR_Load( "sprites/pain_rear.spr" ); + m_hPainRearModel = (struct model_s *)gEngfuncs.GetSpritePointer( m_hPainRear ); } - else - m_fAttackLeft = 0; - gEngfuncs.pTriAPI->RenderMode(kRenderNormal); //return to normal + HUD_DrawRectangle( m_hPainRearModel, kRenderTransAdd ); } + diff --git a/cl_dll/tri.cpp b/cl_dll/tri.cpp index e9f806ea..67282bb1 100644 --- a/cl_dll/tri.cpp +++ b/cl_dll/tri.cpp @@ -123,15 +123,31 @@ void DLLEXPORT HUD_DrawTransparentTriangles( void ) // http://twhl.info/articulator.php?art=114 // -/* -================= -HUD_DrawOrthoTriangles -Orthogonal Triangles -- (relative to resolution, -smackdab on the screen) add them here -================= -*/ -void HUD_DrawOrthoTriangles( void ) +void HUD_DrawRectangle( struct model_s *hSpriteModel, int mode ) { - gHUD.m_Health.DrawPain2(); - gHUD.m_DeathVision.DrawDeathVision(); + gEngfuncs.pTriAPI->RenderMode( mode ); + gEngfuncs.pTriAPI->SpriteTexture( hSpriteModel, 0 ); + gEngfuncs.pTriAPI->Color4f( 1.0f, 1.0f, 1.0f, 1.0f ); + gEngfuncs.pTriAPI->CullFace( TRI_NONE ); + gEngfuncs.pTriAPI->Begin( TRI_QUADS ); + + // top right + gEngfuncs.pTriAPI->TexCoord2f( 0.0f, 1.0f ); + gEngfuncs.pTriAPI->Vertex3f( 0, 0, 0 ); + + // top left + gEngfuncs.pTriAPI->TexCoord2f( 0.0f, 0.0f ); + gEngfuncs.pTriAPI->Vertex3f( 0, ScreenHeight, 0 ); + + // bottom left + gEngfuncs.pTriAPI->TexCoord2f( 1.0f, 0.0f ); + gEngfuncs.pTriAPI->Vertex3f( ScreenWidth, ScreenHeight, 0 ); + + // bottom right + gEngfuncs.pTriAPI->TexCoord2f( 1.0f, 1.0f ); + gEngfuncs.pTriAPI->Vertex3f( ScreenWidth, 0, 0 ); + + gEngfuncs.pTriAPI->End(); //end our list of vertexes + gEngfuncs.pTriAPI->RenderMode( kRenderNormal ); //return to normal } + diff --git a/dlls/player.cpp b/dlls/player.cpp index be56c7d1..59209835 100644 --- a/dlls/player.cpp +++ b/dlls/player.cpp @@ -191,8 +191,6 @@ int gmsgBhopcap = 0; int gmsgStatusText = 0; int gmsgStatusValue = 0; -int gmsgDeathVision = 0; - void LinkUserMessages( void ) { // Already taken care of? @@ -239,8 +237,6 @@ void LinkUserMessages( void ) gmsgStatusText = REG_USER_MSG( "StatusText", -1 ); gmsgStatusValue = REG_USER_MSG( "StatusValue", 3 ); - - gmsgDeathVision = REG_USER_MSG( "DeathVision", 1 ); } LINK_ENTITY_TO_CLASS( player, CBasePlayer ) @@ -923,11 +919,6 @@ void CBasePlayer::Killed( entvars_t *pevAttacker, int iGib ) // Fade screen to white. UTIL_ScreenFade( this, Vector( 255, 255, 255 ), 6, 15, 255, FFADE_OUT ); - // Tell client to draw death vision. - MESSAGE_BEGIN( MSG_ONE, gmsgDeathVision, NULL, pev ); - WRITE_BYTE( 0 ); - MESSAGE_END(); - if( ( pev->health < -40 && iGib != GIB_NEVER ) || iGib == GIB_ALWAYS ) { pev->solid = SOLID_NOT;