From ffa5643e485c653a7cca00bcb7955473bb6cec6c Mon Sep 17 00:00:00 2001 From: hlstriker Date: Thu, 7 Nov 2013 16:41:43 +0000 Subject: [PATCH] Enabled entity glowing. Need to extend the functionality a bit to make it worthwhile. Make sure to update your basemod to get the materials needed. --- mp/src/game/client/c_team_train_watcher.cpp | 4 ++++ mp/src/game/client/client_ff.vpc | 2 +- mp/src/game/client/clientmode_shared.cpp | 2 ++ mp/src/game/client/viewrender.cpp | 6 ++++++ mp/src/game/server/ff/ff_sv_player.cpp | 3 +++ mp/src/game/server/server_ff.vpc | 3 ++- 6 files changed, 18 insertions(+), 2 deletions(-) diff --git a/mp/src/game/client/c_team_train_watcher.cpp b/mp/src/game/client/c_team_train_watcher.cpp index 454c34b2..b71ebddc 100644 --- a/mp/src/game/client/c_team_train_watcher.cpp +++ b/mp/src/game/client/c_team_train_watcher.cpp @@ -82,6 +82,8 @@ void C_TeamTrainWatcher::UpdateGlowEffect( void ) DestroyGlowEffect(); } + // FF --> hlstriker: Commented + /* // create a new effect if we have a cart if ( m_hGlowEnt ) { @@ -89,6 +91,8 @@ void C_TeamTrainWatcher::UpdateGlowEffect( void ) TeamplayRoundBasedRules()->GetTeamGlowColor( GetTeamNumber(), r, g, b ); m_pGlowEffect = new CGlowObject( m_hGlowEnt, Vector( r, g, b ), 1.0, true ); } + */ + // <-- } //----------------------------------------------------------------------------- diff --git a/mp/src/game/client/client_ff.vpc b/mp/src/game/client/client_ff.vpc index d89372f3..9075cc05 100644 --- a/mp/src/game/client/client_ff.vpc +++ b/mp/src/game/client/client_ff.vpc @@ -19,7 +19,7 @@ $Configuration $Compiler { $AdditionalIncludeDirectories "$BASE;.\ff;$SRCDIR\game\shared\ff;$THIRDPARTYDIR\lua;$THIRDPARTYDIR" - $PreprocessorDefinitions "$BASE;FF;FF_CLIENT_DLL;SOURCE_2013" + $PreprocessorDefinitions "$BASE;FF;FF_CLIENT_DLL;SOURCE_2013;GLOWS_ENABLE" } } diff --git a/mp/src/game/client/clientmode_shared.cpp b/mp/src/game/client/clientmode_shared.cpp index 31acc934..b5f15daa 100644 --- a/mp/src/game/client/clientmode_shared.cpp +++ b/mp/src/game/client/clientmode_shared.cpp @@ -745,6 +745,8 @@ int ClientModeShared::HudElementKeyInput( int down, ButtonCode_t keynum, const c //----------------------------------------------------------------------------- bool ClientModeShared::DoPostScreenSpaceEffects( const CViewSetup *pSetup ) { + g_GlowObjectManager.RenderGlowEffects( pSetup, 0 /*GetSplitScreenPlayerSlot()*/ ); // FF --> hlstriker: Added + #if defined( REPLAY_ENABLED ) if ( engine->IsPlayingDemo() ) { diff --git a/mp/src/game/client/viewrender.cpp b/mp/src/game/client/viewrender.cpp index 29ee7bb2..dd5e5099 100644 --- a/mp/src/game/client/viewrender.cpp +++ b/mp/src/game/client/viewrender.cpp @@ -806,6 +806,12 @@ CLIENTEFFECT_REGISTER_BEGIN( PrecachePostProcessingEffects ) CLIENTEFFECT_MATERIAL( "dev/pyro_post" ) #endif + // FF --> hlstriker: Added. +#ifdef GLOWS_ENABLE + CLIENTEFFECT_MATERIAL( "dev/glow_color" ) + CLIENTEFFECT_MATERIAL( "dev/halo_add_to_screen" ) +#endif + // FF <-- CLIENTEFFECT_REGISTER_END_CONDITIONAL( engine->GetDXSupportLevel() >= 90 ) //----------------------------------------------------------------------------- diff --git a/mp/src/game/server/ff/ff_sv_player.cpp b/mp/src/game/server/ff/ff_sv_player.cpp index 9e05a4df..1e596d26 100644 --- a/mp/src/game/server/ff/ff_sv_player.cpp +++ b/mp/src/game/server/ff/ff_sv_player.cpp @@ -27,6 +27,7 @@ #include "ilagcompensationmanager.h" #include "ff_sh_team_manager.h" + // Don't alias here #if defined( CFF_SH_Player ) #undef CFF_SH_Player @@ -418,6 +419,8 @@ void CFF_SV_Player::SetPlayerTeamModel( void ) SetupPlayerSoundsByModel( szModelName ); m_flNextModelChangeTime = gpGlobals->curtime + MODEL_CHANGE_INTERVAL; + + AddGlowEffect(); } void CFF_SV_Player::SetPlayerModel( void ) diff --git a/mp/src/game/server/server_ff.vpc b/mp/src/game/server/server_ff.vpc index c9b3fd19..59db3639 100644 --- a/mp/src/game/server/server_ff.vpc +++ b/mp/src/game/server/server_ff.vpc @@ -18,7 +18,7 @@ $Configuration $Compiler { $AdditionalIncludeDirectories "$BASE;.\ff;.\ff\other;.\ff\entities;$SRCDIR\game\shared\ff;$SRCDIR\game\shared\ff\other;$THIRDPARTYDIR\lua;$THIRDPARTYDIR" - $PreprocessorDefinitions "$BASE;FF;FF_DLL" + $PreprocessorDefinitions "$BASE;FF;FF_DLL;GLOWS_ENABLE" } } @@ -47,6 +47,7 @@ $Project "Server (FF)" $File "ff\entities\ff_sv_point_ff_teamcheck.h" $File "ff\entities\ff_sv_teamcheck_target.h" $File "ff\entities\ff_sv_teamcheck_target.cpp" + $File "ff\entities\ff_sv_point_ff_message.cpp" } $Folder "Other" {