mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-06 18:12:14 +00:00
- made muzzle flash light apply random roll
- removed redundant post processing check boxes - added cvars for chromatic aberration and damage effects
This commit is contained in:
parent
ae3137a94a
commit
f15d6c092f
11 changed files with 102 additions and 37 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -90,3 +90,4 @@ config.cfg
|
|||
/sp/src/game/server/Release_gstringv2
|
||||
|
||||
/sp/src/utils/vbsp/Debug
|
||||
/sp/src/utils/vbsp/Release
|
||||
|
|
|
@ -46,6 +46,7 @@ C_GstringPlayer::C_GstringPlayer()
|
|||
, m_flBobModelAmount( 0.0f )
|
||||
, m_angLastBobAngle( vec3_angle )
|
||||
, m_pBodyModel( NULL )
|
||||
, m_flMuzzleFlashRoll( 0.0f )
|
||||
{
|
||||
m_bHasUseEntity = false;
|
||||
}
|
||||
|
@ -228,6 +229,7 @@ void C_GstringPlayer::ProcessMuzzleFlashEvent()
|
|||
|
||||
m_flMuzzleFlashDuration = RandomFloat( 0.025f, 0.045f );
|
||||
m_flMuzzleFlashTime = gpGlobals->curtime + m_flMuzzleFlashDuration;
|
||||
m_flMuzzleFlashRoll = RandomFloat( 0, 360.0f );
|
||||
}
|
||||
|
||||
void C_GstringPlayer::UpdateFlashlight()
|
||||
|
@ -324,6 +326,11 @@ void C_GstringPlayer::UpdateFlashlight()
|
|||
|
||||
float flStrength = ( m_flMuzzleFlashTime - gpGlobals->curtime ) / m_flMuzzleFlashDuration;
|
||||
|
||||
QAngle ang;
|
||||
VectorAngles( vecForward, vecUp, ang );
|
||||
ang.z = m_flMuzzleFlashRoll;
|
||||
AngleVectors( ang, &vecForward, &vecRight, &vecUp );
|
||||
|
||||
// Update the light with the new position and direction.
|
||||
m_pMuzzleFlashEffect->UpdateLight( vecPos, vecForward, vecRight, vecUp, flStrength * flStrength );
|
||||
|
||||
|
@ -375,11 +382,13 @@ void C_GstringPlayer::UpdateBodyModel()
|
|||
Vector fwd, right, up;
|
||||
AngleVectors( angle, &fwd, &right, &up );
|
||||
|
||||
const float flMovingMinSpeed = 10.0f;
|
||||
|
||||
const float flSpeed = GetAbsVelocity().Length2D();
|
||||
const bool bInAir = ( GetFlags() & FL_ONGROUND ) == 0;
|
||||
const bool bDuck = m_Local.m_bDucked
|
||||
|| m_Local.m_bDucking;
|
||||
const bool bMoving = flSpeed > 40.0f;
|
||||
const bool bMoving = flSpeed > flMovingMinSpeed;
|
||||
|
||||
static float flBackOffset = gstring_firstpersonbody_forwardoffset_min.GetFloat();
|
||||
float flBackOffsetDesired = bDuck ?
|
||||
|
@ -426,7 +435,7 @@ void C_GstringPlayer::UpdateBodyModel()
|
|||
float flLength = vecVelocity.NormalizeInPlace();
|
||||
|
||||
static bool bWasMoving = false;
|
||||
const bool bDoMoveYaw = flLength > 40.0f;
|
||||
const bool bDoMoveYaw = flLength > flMovingMinSpeed;
|
||||
|
||||
if ( bDoMoveYaw
|
||||
&& m_pBodyModel->m_iPoseParam_MoveYaw >= 0 )
|
||||
|
@ -465,6 +474,8 @@ void C_GstringPlayer::UpdateBodyModel()
|
|||
if ( flGroundSpeed > 0.0f )
|
||||
{
|
||||
flPlaybackrate = flSpeed / flGroundSpeed;
|
||||
|
||||
flPlaybackrate = MIN( 3.0f, flPlaybackrate );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ private:
|
|||
|
||||
float m_flMuzzleFlashTime;
|
||||
float m_flMuzzleFlashDuration;
|
||||
float m_flMuzzleFlashRoll;
|
||||
C_MuzzleflashEffect *m_pMuzzleFlashEffect;
|
||||
|
||||
bool m_bFlashlightVisible;
|
||||
|
|
|
@ -25,22 +25,26 @@ C_MuzzleflashEffect::~C_MuzzleflashEffect()
|
|||
}
|
||||
}
|
||||
|
||||
void C_MuzzleflashEffect::UpdateLight( const Vector &vecPos, const Vector &vecDir, const Vector &vecRight, const Vector &vecUp, float flStrength )
|
||||
void C_MuzzleflashEffect::UpdateLight( const Vector &vecPos, const Vector &vecDir, const Vector &vecRight, const Vector &vecUp,
|
||||
float flStrength )
|
||||
{
|
||||
FlashlightState_t state;
|
||||
|
||||
Quaternion quat;
|
||||
BasisToQuaternion( vecDir, vecRight, vecUp, quat );
|
||||
state.m_fLinearAtten = 2500.0f * flStrength;
|
||||
state.m_fLinearAtten = 1000.0f * flStrength;
|
||||
state.m_fQuadraticAtten = 500.0f * flStrength;
|
||||
|
||||
state.m_vecLightOrigin = vecPos;
|
||||
state.m_quatOrientation = quat;
|
||||
state.m_fVerticalFOVDegrees = state.m_fHorizontalFOVDegrees = 100.0f + 40.0f * flStrength;
|
||||
state.m_fConstantAtten = 0.0f;
|
||||
//state.m_Color[0] = 1.0f;
|
||||
//state.m_Color[1] = 0.7f;
|
||||
//state.m_Color[2] = 0.3f;
|
||||
state.m_Color[0] = 1.0f;
|
||||
state.m_Color[1] = 0.7f;
|
||||
state.m_Color[2] = 0.3f;
|
||||
state.m_Color[1] = 1.0f;
|
||||
state.m_Color[2] = 1.0f;
|
||||
state.m_Color[3] = 0.0f;
|
||||
state.m_NearZ = 5.0f; // Push near plane out so that we don't clip the world when the flashlight pulls back
|
||||
state.m_FarZ = 500.0f;
|
||||
|
|
|
@ -9,7 +9,8 @@ public:
|
|||
C_MuzzleflashEffect();
|
||||
~C_MuzzleflashEffect();
|
||||
|
||||
virtual void UpdateLight(const Vector &vecPos, const Vector &vecDir, const Vector &vecRight, const Vector &vecUp, float flStrength );
|
||||
virtual void UpdateLight(const Vector &vecPos, const Vector &vecDir, const Vector &vecRight, const Vector &vecUp,
|
||||
float flStrength );
|
||||
|
||||
float GetHorizontalFOV() const { return m_flHorizontalFOV; }
|
||||
|
||||
|
|
|
@ -100,7 +100,8 @@ void DrawBarsAndGrain( int x, int y, int w, int h )
|
|||
C_GstringPlayer *pPlayer = LocalGstringPlayer();
|
||||
float flNightvisionStrengthInv = 1.0f - (pPlayer ? pPlayer->GetNightvisionFraction() : 0.0f);
|
||||
|
||||
if ( cvar_gstring_drawfilmgrain.GetBool() )
|
||||
if ( cvar_gstring_drawfilmgrain.GetBool()
|
||||
&& cvar_gstring_filmgrain_strength.GetFloat() > 0.0f )
|
||||
{
|
||||
static int iFilmgrainIndex = shaderEdit->GetPPEIndex( FILMGRAIN_EDITOR_NAME );
|
||||
|
||||
|
@ -278,7 +279,8 @@ void DrawExplosionBlur()
|
|||
if ( iExplosionIndex < 0 )
|
||||
return;
|
||||
|
||||
if ( !cvar_gstring_drawexplosionblur.GetInt() )
|
||||
if ( !cvar_gstring_drawexplosionblur.GetInt()
|
||||
|| cvar_gstring_explosionfx_strength.GetFloat() <= 0.0f )
|
||||
return;
|
||||
|
||||
for ( int i = 0; i < g_hExplosionBlurQueue.Count(); i++ )
|
||||
|
@ -332,7 +334,10 @@ void DrawMotionBlur()
|
|||
if ( iMotionBlur < 0 )
|
||||
return;
|
||||
|
||||
if ( !cvar_gstring_drawmotionblur.GetInt() )
|
||||
float motionblur_scale = cvar_gstring_motionblur_scale.GetFloat();
|
||||
|
||||
if ( !cvar_gstring_drawmotionblur.GetInt()
|
||||
|| motionblur_scale <= 0.0f )
|
||||
return;
|
||||
|
||||
DEFINE_SHADEREDITOR_MATERIALVAR( MOTIONBLUR_EDITOR_NAME, "motionblur", "$MUTABLE_01", pVar_LinearDirection );
|
||||
|
@ -362,8 +367,6 @@ void DrawMotionBlur()
|
|||
Vector delta = pos_cur - pos_last;
|
||||
float distance = delta.Length();
|
||||
|
||||
float motionblur_scale = cvar_gstring_motionblur_scale.GetFloat();
|
||||
|
||||
if ( gpGlobals->frametime < (1.0f/20.0f) &&
|
||||
gpGlobals->frametime > 0.0f )
|
||||
{
|
||||
|
@ -679,6 +682,13 @@ void DrawHurtFX()
|
|||
if ( !ShouldDrawCommon() )
|
||||
return;
|
||||
|
||||
const float flHurtFXEnable = cvar_gstring_drawhurtfx.GetBool() ? 1.0f : 0.0f;
|
||||
const float flChromaticAmount = cvar_gstring_chromatic_aberration.GetFloat();
|
||||
|
||||
if ( flHurtFXEnable <= 0.0f
|
||||
&& flChromaticAmount <= 0.0f )
|
||||
return;
|
||||
|
||||
static const int iHurtFXIndex = shaderEdit->GetPPEIndex( HURTFX_EDITOR_NAME );
|
||||
|
||||
if ( iHurtFXIndex < 0 )
|
||||
|
@ -698,11 +708,12 @@ void DrawHurtFX()
|
|||
|
||||
const float flDecayDuration = 0.5f;
|
||||
const float flHealthAnimationDuration = 0.7f;
|
||||
const float flChromaticHurtMax = ( flChromaticAmount > 0.0f ) ? 0.02f : 0.0f;
|
||||
|
||||
int iHealthCurrent = pPlayer->GetHealth();
|
||||
iHealthCurrent = MAX( 0, iHealthCurrent );
|
||||
|
||||
float flChromatic = RemapValClamped( iHealthCurrent, 0, 25, 0.02f, 0.008f );
|
||||
float flChromatic = RemapValClamped( iHealthCurrent, 0, 25, flChromaticHurtMax, flChromaticAmount );
|
||||
float flRedBlend = RemapValClamped( iHealthCurrent, 0, 25, 2.5f, 0.0f );
|
||||
float flHealthBlend = 0.0f;
|
||||
|
||||
|
@ -712,7 +723,7 @@ void DrawHurtFX()
|
|||
{
|
||||
if ( iHealthLast > iHealthCurrent )
|
||||
{
|
||||
float flIncrement = RemapValClamped( iHealthCurrent, 0, 90, 0.5f, 0.1f );
|
||||
float flIncrement = RemapValClamped( iHealthCurrent, 0, 90, 0.65f, 0.35f );
|
||||
|
||||
flAnimationTime = gpGlobals->curtime + flIncrement;
|
||||
}
|
||||
|
@ -756,7 +767,8 @@ void DrawHurtFX()
|
|||
vecLastParams = params;
|
||||
}
|
||||
|
||||
pVar_HurtFX_Params->SetVecValue( params.x, params.y, params.z );
|
||||
|
||||
pVar_HurtFX_Params->SetVecValue( params.x, params.y * flHurtFXEnable, params.z * flHurtFXEnable );
|
||||
|
||||
shaderEdit->DrawPPEOnDemand( iHurtFXIndex );
|
||||
}
|
||||
|
|
|
@ -21,8 +21,7 @@ CVGUIGstringOptions::CVGUIGstringOptions( VPANEL parent, const char *pName ) : B
|
|||
|
||||
Activate();
|
||||
|
||||
m_pCheck_CinematicBars = new CheckButton( this, "check_bars", "Enable cinematic bars" );
|
||||
m_pCheck_FilmGrain = new CheckButton( this, "check_filmgrain", "Enable film grain" );
|
||||
m_pCheck_HurtFX = new CheckButton( this, "check_bars", "Enable damage effects" );
|
||||
m_pCheck_Vignette = new CheckButton( this, "check_vignette", "Enable vignette" );
|
||||
m_pCheck_GodRays = new CheckButton( this, "check_godrays", "Enable god-rays" );
|
||||
m_pCheck_WaterEffects = new CheckButton( this, "check_screenwater", "Enable water screen effects" );
|
||||
|
@ -31,21 +30,20 @@ CVGUIGstringOptions::CVGUIGstringOptions( VPANEL parent, const char *pName ) : B
|
|||
m_pCBox_BloomFlare->AddItem( "Never", NULL );
|
||||
m_pCBox_BloomFlare->AddItem( "Map based", NULL );
|
||||
m_pCBox_BloomFlare->AddItem( "Always", NULL );
|
||||
m_pCheck_MotionBlur = new CheckButton( this, "check_motionblur", "Enable motion blur" );
|
||||
m_pCheck_DreamBlur = new CheckButton( this, "check_dreamblur", "Enable dream effects" );
|
||||
m_pCheck_ScreenBlur = new CheckButton( this, "check_screenblur", "Enable screen blur" );
|
||||
m_pCheck_ExplosionBlur = new CheckButton( this, "check_explosion", "Enable explosion distortion" );
|
||||
|
||||
#define CREATE_VGUI_SLIDER( var, name, minRange, maxRange, ticks ) var = new Slider( this, name ); \
|
||||
var->SetRange( minRange, maxRange ); \
|
||||
var->SetNumTicks( ticks );
|
||||
|
||||
CREATE_VGUI_SLIDER( m_pSlider_CinematicBars_Size, "slider_bars", 0, 10, 10 );
|
||||
CREATE_VGUI_SLIDER( m_pSlider_MotionBlur_Strength, "slider_mblur", 1, 10, 9 );
|
||||
CREATE_VGUI_SLIDER( m_pSlider_MotionBlur_Strength, "slider_mblur", 0, 10, 10 );
|
||||
CREATE_VGUI_SLIDER( m_pSlider_BloomFlare_Strength, "slider_bflare", 1, 10, 9 );
|
||||
CREATE_VGUI_SLIDER( m_pSlider_ExplosionBlur_Strength, "slider_expblur", 1, 10, 9 );
|
||||
CREATE_VGUI_SLIDER( m_pSlider_ExplosionBlur_Strength, "slider_expblur", 0, 10, 10 );
|
||||
CREATE_VGUI_SLIDER( m_pSlider_Desaturation_Strength, "slider_desat", 0, 10, 10 );
|
||||
CREATE_VGUI_SLIDER( m_pSlider_FilmGrain_Strength, "slider_filmgrain", 1, 10, 9 );
|
||||
CREATE_VGUI_SLIDER( m_pSlider_FilmGrain_Strength, "slider_filmgrain", 0, 10, 10 );
|
||||
CREATE_VGUI_SLIDER( m_pSlider_Chromatic_Strength, "slider_chromatic", 0, 10, 10 );
|
||||
|
||||
m_pLabel_Value_CinematicBars = new Label( this, "label_bars", "" );
|
||||
m_pLabel_Value_MotionBlur = new Label( this, "label_mblur", "" );
|
||||
|
@ -53,6 +51,7 @@ CVGUIGstringOptions::CVGUIGstringOptions( VPANEL parent, const char *pName ) : B
|
|||
m_pLabel_Value_ExplosionBlur = new Label( this, "label_expblur", "" );
|
||||
m_pLabel_Value_Desaturation = new Label( this, "label_desat", "" );
|
||||
m_pLabel_Value_FilmGrain = new Label( this, "label_filmgrain", "" );
|
||||
m_pLabel_Value_Chromatic = new Label( this, "label_chromatic", "" );
|
||||
|
||||
LoadControlSettings( "resource/gstring_options.res" );
|
||||
|
||||
|
@ -77,12 +76,9 @@ void CVGUIGstringOptions::OnCommand( const char *cmd )
|
|||
#define CVAR_CHECK_INTEGER( x, y ) ( x.SetValue( ( y->IsSelected() ? 1 : 0 ) ) )
|
||||
#define CVAR_SLIDER_FLOAT( x, y, ratio ) ( x.SetValue( (float)(y->GetValue()/(float)ratio ) ) )
|
||||
|
||||
CVAR_CHECK_INTEGER( cvar_gstring_drawbars, m_pCheck_CinematicBars );
|
||||
CVAR_CHECK_INTEGER( cvar_gstring_drawfilmgrain, m_pCheck_FilmGrain );
|
||||
CVAR_CHECK_INTEGER( cvar_gstring_drawhurtfx, m_pCheck_HurtFX );
|
||||
CVAR_CHECK_INTEGER( cvar_gstring_drawvignette, m_pCheck_Vignette );
|
||||
CVAR_CHECK_INTEGER( cvar_gstring_drawgodrays, m_pCheck_GodRays );
|
||||
CVAR_CHECK_INTEGER( cvar_gstring_drawexplosionblur, m_pCheck_ExplosionBlur );
|
||||
CVAR_CHECK_INTEGER( cvar_gstring_drawmotionblur, m_pCheck_MotionBlur );
|
||||
CVAR_CHECK_INTEGER( cvar_gstring_drawscreenblur, m_pCheck_ScreenBlur );
|
||||
CVAR_CHECK_INTEGER( cvar_gstring_drawdreamblur, m_pCheck_DreamBlur );
|
||||
CVAR_CHECK_INTEGER( cvar_gstring_drawlensflare, m_pCheck_LensFlare );
|
||||
|
@ -94,6 +90,7 @@ void CVGUIGstringOptions::OnCommand( const char *cmd )
|
|||
CVAR_SLIDER_FLOAT( cvar_gstring_bloomflare_strength, m_pSlider_BloomFlare_Strength, 2 );
|
||||
CVAR_SLIDER_FLOAT( cvar_gstring_desaturation_strength, m_pSlider_Desaturation_Strength, 10 );
|
||||
CVAR_SLIDER_FLOAT( cvar_gstring_filmgrain_strength, m_pSlider_FilmGrain_Strength, 50 );
|
||||
CVAR_SLIDER_FLOAT( cvar_gstring_chromatic_aberration, m_pSlider_Chromatic_Strength, 1000 );
|
||||
|
||||
cvar_gstring_drawbloomflare.SetValue( m_pCBox_BloomFlare->GetActiveItem() );
|
||||
|
||||
|
@ -101,6 +98,28 @@ void CVGUIGstringOptions::OnCommand( const char *cmd )
|
|||
|
||||
CloseModal();
|
||||
}
|
||||
else if ( !Q_stricmp( cmd, "defaults" ) )
|
||||
{
|
||||
cvar_gstring_drawhurtfx.Revert();
|
||||
cvar_gstring_drawvignette.Revert();
|
||||
cvar_gstring_drawgodrays.Revert();
|
||||
cvar_gstring_drawscreenblur.Revert();
|
||||
cvar_gstring_drawdreamblur.Revert();
|
||||
cvar_gstring_drawlensflare.Revert();
|
||||
cvar_gstring_drawwatereffects.Revert();
|
||||
|
||||
cvar_gstring_drawbloomflare.Revert();
|
||||
|
||||
cvar_gstring_explosionfx_strength.Revert();
|
||||
cvar_gstring_bars_scale.Revert();
|
||||
cvar_gstring_motionblur_scale.Revert();
|
||||
cvar_gstring_bloomflare_strength.Revert();
|
||||
cvar_gstring_desaturation_strength.Revert();
|
||||
cvar_gstring_filmgrain_strength.Revert();
|
||||
cvar_gstring_chromatic_aberration.Revert();
|
||||
|
||||
ReadValues();
|
||||
}
|
||||
else
|
||||
BaseClass::OnCommand( cmd );
|
||||
}
|
||||
|
@ -109,15 +128,17 @@ void CVGUIGstringOptions::ApplySchemeSettings( vgui::IScheme *pScheme )
|
|||
{
|
||||
BaseClass::ApplySchemeSettings( pScheme );
|
||||
|
||||
ReadValues();
|
||||
}
|
||||
|
||||
void CVGUIGstringOptions::ReadValues()
|
||||
{
|
||||
#define CVAR_CHECK_SELECTED( x, y ) ( y->SetSelected( x.GetBool() ) )
|
||||
#define CVAR_SLIDER_INTEGER( x, y, ratio ) ( y->SetValue( x.GetFloat() * ratio ) )
|
||||
|
||||
CVAR_CHECK_SELECTED( cvar_gstring_drawbars, m_pCheck_CinematicBars );
|
||||
CVAR_CHECK_SELECTED( cvar_gstring_drawfilmgrain, m_pCheck_FilmGrain );
|
||||
CVAR_CHECK_SELECTED( cvar_gstring_drawhurtfx, m_pCheck_HurtFX );
|
||||
CVAR_CHECK_SELECTED( cvar_gstring_drawvignette, m_pCheck_Vignette );
|
||||
CVAR_CHECK_SELECTED( cvar_gstring_drawgodrays, m_pCheck_GodRays );
|
||||
CVAR_CHECK_SELECTED( cvar_gstring_drawexplosionblur, m_pCheck_ExplosionBlur );
|
||||
CVAR_CHECK_SELECTED( cvar_gstring_drawmotionblur, m_pCheck_MotionBlur );
|
||||
CVAR_CHECK_SELECTED( cvar_gstring_drawscreenblur, m_pCheck_ScreenBlur );
|
||||
CVAR_CHECK_SELECTED( cvar_gstring_drawdreamblur, m_pCheck_DreamBlur );
|
||||
CVAR_CHECK_SELECTED( cvar_gstring_drawlensflare, m_pCheck_LensFlare );
|
||||
|
@ -126,12 +147,13 @@ void CVGUIGstringOptions::ApplySchemeSettings( vgui::IScheme *pScheme )
|
|||
m_pCBox_BloomFlare->ActivateItem( clamp( cvar_gstring_drawbloomflare.GetInt(),
|
||||
0, m_pCBox_BloomFlare->GetItemCount() ) );
|
||||
|
||||
CVAR_SLIDER_INTEGER( cvar_gstring_explosionfx_strength, m_pSlider_ExplosionBlur_Strength, 10 );
|
||||
CVAR_SLIDER_INTEGER( cvar_gstring_explosionfx_strength, m_pSlider_ExplosionBlur_Strength, 11 );
|
||||
CVAR_SLIDER_INTEGER( cvar_gstring_bars_scale, m_pSlider_CinematicBars_Size, 51 );
|
||||
CVAR_SLIDER_INTEGER( cvar_gstring_motionblur_scale, m_pSlider_MotionBlur_Strength, 10 );
|
||||
CVAR_SLIDER_INTEGER( cvar_gstring_motionblur_scale, m_pSlider_MotionBlur_Strength, 11 );
|
||||
CVAR_SLIDER_INTEGER( cvar_gstring_bloomflare_strength, m_pSlider_BloomFlare_Strength, 2 );
|
||||
CVAR_SLIDER_INTEGER( cvar_gstring_desaturation_strength, m_pSlider_Desaturation_Strength, 10 );
|
||||
CVAR_SLIDER_INTEGER( cvar_gstring_filmgrain_strength, m_pSlider_FilmGrain_Strength, 51 );
|
||||
CVAR_SLIDER_INTEGER( cvar_gstring_chromatic_aberration, m_pSlider_Chromatic_Strength, 1100 );
|
||||
}
|
||||
|
||||
void CVGUIGstringOptions::PerformLayout()
|
||||
|
@ -153,6 +175,7 @@ void CVGUIGstringOptions::OnSliderMoved( KeyValues *pKV )
|
|||
m_pLabel_Value_ExplosionBlur->SetText( VarArgs( "%.1f", m_pSlider_ExplosionBlur_Strength->GetValue() / 10.0f ) );
|
||||
m_pLabel_Value_Desaturation->SetText( VarArgs( "%.1f", m_pSlider_Desaturation_Strength->GetValue() / 10.0f ) );
|
||||
m_pLabel_Value_FilmGrain->SetText( VarArgs( "%.1f", m_pSlider_FilmGrain_Strength->GetValue() / 10.0f ) );
|
||||
m_pLabel_Value_Chromatic->SetText( VarArgs( "%.1f", m_pSlider_Chromatic_Strength->GetValue() / 10.0f ) );
|
||||
}
|
||||
|
||||
CON_COMMAND( vgui_showGstringOptions, "" )
|
||||
|
|
|
@ -29,8 +29,9 @@ protected:
|
|||
|
||||
private:
|
||||
|
||||
vgui::CheckButton *m_pCheck_CinematicBars;
|
||||
vgui::CheckButton *m_pCheck_FilmGrain;
|
||||
void ReadValues();
|
||||
|
||||
vgui::CheckButton *m_pCheck_HurtFX;
|
||||
vgui::CheckButton *m_pCheck_GodRays;
|
||||
vgui::CheckButton *m_pCheck_WaterEffects;
|
||||
vgui::CheckButton *m_pCheck_Vignette;
|
||||
|
@ -38,10 +39,8 @@ private:
|
|||
vgui::CheckButton *m_pCheck_LensFlare;
|
||||
vgui::ComboBox *m_pCBox_BloomFlare;
|
||||
|
||||
vgui::CheckButton *m_pCheck_MotionBlur;
|
||||
vgui::CheckButton *m_pCheck_DreamBlur;
|
||||
vgui::CheckButton *m_pCheck_ScreenBlur;
|
||||
vgui::CheckButton *m_pCheck_ExplosionBlur;
|
||||
|
||||
vgui::Slider *m_pSlider_CinematicBars_Size;
|
||||
vgui::Slider *m_pSlider_MotionBlur_Strength;
|
||||
|
@ -49,6 +48,7 @@ private:
|
|||
vgui::Slider *m_pSlider_ExplosionBlur_Strength;
|
||||
vgui::Slider *m_pSlider_Desaturation_Strength;
|
||||
vgui::Slider *m_pSlider_FilmGrain_Strength;
|
||||
vgui::Slider *m_pSlider_Chromatic_Strength;
|
||||
|
||||
vgui::Label *m_pLabel_Value_CinematicBars;
|
||||
vgui::Label *m_pLabel_Value_MotionBlur;
|
||||
|
@ -56,6 +56,7 @@ private:
|
|||
vgui::Label *m_pLabel_Value_ExplosionBlur;
|
||||
vgui::Label *m_pLabel_Value_Desaturation;
|
||||
vgui::Label *m_pLabel_Value_FilmGrain;
|
||||
vgui::Label *m_pLabel_Value_Chromatic;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,9 @@
|
|||
|
||||
// GSTRINGMIGRATION
|
||||
#include "Gstring/gstring_postprocess.h"
|
||||
#include "Gstring/gstring_cvars.h"
|
||||
#include "Gstring/vgui/vParticleContainer.h"
|
||||
// END GSTRINGMIGRATION
|
||||
|
||||
using namespace vgui;
|
||||
|
||||
|
@ -173,6 +175,9 @@ void CHudDamageIndicator::Init( void )
|
|||
//-----------------------------------------------------------------------------
|
||||
bool CHudDamageIndicator::ShouldDraw( void )
|
||||
{
|
||||
if ( !cvar_gstring_drawhurtfx.GetBool() ) // GSTRINGMIGRATION
|
||||
return false;
|
||||
|
||||
bool bNeedsDraw = m_DmgColorLeft[3] ||
|
||||
m_DmgColorRight[3] ||
|
||||
m_DmgHighColorLeft[3] ||
|
||||
|
|
|
@ -17,7 +17,7 @@ ConVar cvar_gstring_drawmotionblur( "gstring_DrawMotionblur", "1", FCVAR_ARCHIVE
|
|||
ConVar cvar_gstring_drawscreenblur( "gstring_DrawScreenBlur", "1", FCVAR_ARCHIVE );
|
||||
ConVar cvar_gstring_drawdreamblur( "gstring_DrawDreamBlur", "1", FCVAR_ARCHIVE );
|
||||
ConVar cvar_gstring_drawlensflare( "gstring_DrawLensFlare", "1", FCVAR_ARCHIVE );
|
||||
ConVar cvar_gstring_drawbloomflare( "gstring_DrawBloomFlare", "0", FCVAR_ARCHIVE );
|
||||
ConVar cvar_gstring_drawbloomflare( "gstring_DrawBloomFlare", "2", FCVAR_ARCHIVE );
|
||||
ConVar cvar_gstring_drawwatereffects( "gstring_DrawWaterEffects", "1", FCVAR_ARCHIVE );
|
||||
|
||||
ConVar cvar_gstring_bars_scale( "gstring_Bars_scale", "0.14", FCVAR_ARCHIVE );
|
||||
|
@ -33,4 +33,7 @@ ConVar cvar_gstring_vignette_range_max( "gstring_Vignette_range_max", "0.7", FCV
|
|||
|
||||
ConVar cvar_gstring_debug_vguiparticles( "gstring_debug_VguiParticles", "0" );
|
||||
ConVar cvar_gstring_nightvision_minlighting( "gstring_nightvision_minlighting", "0.5" );
|
||||
|
||||
ConVar cvar_gstring_drawhurtfx( "gstring_DrawHurtFX", "1" );
|
||||
ConVar cvar_gstring_chromatic_aberration( "gstring_chromatic_aberration", "0.005" );
|
||||
#endif
|
||||
|
|
|
@ -32,6 +32,9 @@ extern ConVar cvar_gstring_vignette_range_max;
|
|||
|
||||
extern ConVar cvar_gstring_debug_vguiparticles;
|
||||
extern ConVar cvar_gstring_nightvision_minlighting;
|
||||
|
||||
extern ConVar cvar_gstring_drawhurtfx;
|
||||
extern ConVar cvar_gstring_chromatic_aberration;
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue