Skip to content

Commit

Permalink
Added glow
Browse files Browse the repository at this point in the history
  • Loading branch information
XutaxKamay committed Sep 8, 2024
1 parent 01006a6 commit 543b8a5
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
5 changes: 4 additions & 1 deletion game/client/c_team_train_watcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
#include "igameevents.h"
#include "c_team_objectiveresource.h"

#ifdef GLOWS_ENABLE
#include "teamplayroundbased_gamerules.h"
#endif

#ifdef TF_CLIENT_DLL
#include "tf_shareddefs.h"
#include "teamplayroundbased_gamerules.h"
#endif

// memdbgon must be the last include file in a .cpp file!!!
Expand Down
3 changes: 2 additions & 1 deletion game/client/client_cstrike.vpc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $Configuration
$Compiler
{
$AdditionalIncludeDirectories "$BASE;$SRCDIR\game\shared\cstrike\control,.\cstrike,.\cstrike\control,.\cstrike\VGUI,$SRCDIR\game\shared\cstrike"
$PreprocessorDefinitions "$BASE;CSTRIKE_DLL;NEXT_BOT"
$PreprocessorDefinitions "$BASE;CSTRIKE_DLL;NEXT_BOT;GLOWS_ENABLE"
}
}

Expand All @@ -41,6 +41,7 @@ $Project "Client (CStrike)"
$File "hud_baseachievement_tracker.h"
$File "$SRCDIR\game\client\hud_vote.h"
$File "$SRCDIR\game\client\hud_vote.cpp"
$File "$SRCDIR\game\client\glow_outline_effect.cpp"
$File "$SRCDIR\game\shared\predicted_viewmodel.cpp"
$File "$SRCDIR\game\shared\predicted_viewmodel.h"

Expand Down
10 changes: 10 additions & 0 deletions game/client/clientmode_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ extern ConVar replay_rendersetting_renderglow;
#include "econ_item_description.h"
#endif

#include "clienteffectprecachesystem.h"

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

Expand All @@ -87,6 +89,11 @@ extern ConVar voice_modenable;

extern bool IsInCommentaryMode( void );

CLIENTEFFECT_REGISTER_BEGIN( PrecachePostProcessingEffectsGlow )
CLIENTEFFECT_MATERIAL( "dev/glow_color" )
CLIENTEFFECT_MATERIAL( "dev/halo_add_to_screen" )
CLIENTEFFECT_REGISTER_END_CONDITIONAL( engine->GetDXSupportLevel() >= 90 )

#ifdef VOICE_VOX_ENABLE
void VoxCallback( IConVar *var, const char *oldString, float oldFloat )
{
Expand Down Expand Up @@ -752,6 +759,9 @@ int ClientModeShared::HudElementKeyInput( int down, ButtonCode_t keynum, const c
//-----------------------------------------------------------------------------
bool ClientModeShared::DoPostScreenSpaceEffects( const CViewSetup *pSetup )
{
#ifdef GLOWS_ENABLE
g_GlowObjectManager.RenderGlowEffects( pSetup, 0 );
#endif
#if defined( REPLAY_ENABLED )
if ( engine->IsPlayingDemo() )
{
Expand Down
2 changes: 2 additions & 0 deletions game/server/cstrike/cs_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1598,6 +1598,8 @@ void CCSPlayer::PostThink()
StopSound( "Player.AmbientUnderWater" );
SetPlayerUnderwater( false );
}

AddGlowEffect();
}


Expand Down
2 changes: 1 addition & 1 deletion game/server/server_cstrike.vpc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $Configuration
$Compiler
{
$AdditionalIncludeDirectories "$BASE;$SRCDIR\game\shared\cstrike\control,$SRCDIR\game\shared\cstrike,.\cstrike,.\cstrike\bot,.\cstrike\bot\states,$SRCDIR\game\shared\cstrike\bot,.\cstrike\hostage,.\cstrike\control"
$PreprocessorDefinitions "$BASE;BOTS;CSTRIKE_DLL;NEXT_BOT"
$PreprocessorDefinitions "$BASE;BOTS;CSTRIKE_DLL;NEXT_BOT;GLOWS_ENABLE"
}

$Linker
Expand Down
2 changes: 1 addition & 1 deletion gamedata
Submodule gamedata updated from 6c9a41 to 3cd624

0 comments on commit 543b8a5

Please sign in to comment.