Added cl_cs_render_glow_behind_walls
This commit is contained in:
parent
8f7d2f6843
commit
0157c765e8
2 changed files with 26 additions and 2 deletions
|
@ -83,6 +83,15 @@ void C_BaseCombatCharacter::OnDataChanged( DataUpdateType_t updateType )
|
||||||
{
|
{
|
||||||
UpdateGlowEffect();
|
UpdateGlowEffect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( m_pGlowEffect )
|
||||||
|
{
|
||||||
|
float r, g, b;
|
||||||
|
GetGlowEffectColor( &r, &g, &b );
|
||||||
|
|
||||||
|
m_pGlowEffect->SetColor( Vector( r, g, b ) );
|
||||||
|
m_pGlowEffect->SetRenderFlags( m_bGlowOccluded, m_bGlowNonOccluded );
|
||||||
|
}
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2875,6 +2875,8 @@ bool C_CSPlayer::SetupBones( matrix3x4_t* pBoneToWorldOut, int nMaxBones, int bo
|
||||||
return BaseClass::SetupBones( pBoneToWorldOut, nMaxBones, boneMask, currentTime );
|
return BaseClass::SetupBones( pBoneToWorldOut, nMaxBones, boneMask, currentTime );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ConVar cl_cs_render_glow_behind_walls("cl_cs_render_glow_behind_walls", "0", FCVAR_CHEAT);
|
||||||
|
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
void C_CSPlayer::GetGlowEffectColor( float* r, float* g, float* b )
|
void C_CSPlayer::GetGlowEffectColor( float* r, float* g, float* b )
|
||||||
{
|
{
|
||||||
|
@ -2891,9 +2893,22 @@ void C_CSPlayer::GetGlowEffectColor( float* r, float* g, float* b )
|
||||||
*b = 0;
|
*b = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( cl_cs_render_glow_behind_walls.GetInt() == 1 )
|
||||||
|
{
|
||||||
m_bGlowOccluded = false;
|
m_bGlowOccluded = false;
|
||||||
m_bGlowNonOccluded = true;
|
m_bGlowNonOccluded = true;
|
||||||
}
|
}
|
||||||
|
else if ( cl_cs_render_glow_behind_walls.GetInt() == 2 )
|
||||||
|
{
|
||||||
|
m_bGlowOccluded = true;
|
||||||
|
m_bGlowNonOccluded = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_bGlowOccluded = false;
|
||||||
|
m_bGlowNonOccluded = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
Loading…
Reference in a new issue