Exposed glowing to all CBaseEntity to make everyones life easier. You can now set the glow RGBA as well.
This commit is contained in:
parent
ffa5643e48
commit
82afcfedc8
|
@ -30,11 +30,15 @@ C_BaseCombatCharacter::C_BaseCombatCharacter()
|
||||||
m_iAmmo.Set( i, 0 );
|
m_iAmmo.Set( i, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
m_pGlowEffect = NULL;
|
m_pGlowEffect = NULL;
|
||||||
m_bGlowEnabled = false;
|
m_bGlowEnabled = false;
|
||||||
m_bOldGlowEnabled = false;
|
m_bOldGlowEnabled = false;
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -42,9 +46,13 @@ C_BaseCombatCharacter::C_BaseCombatCharacter()
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
C_BaseCombatCharacter::~C_BaseCombatCharacter()
|
C_BaseCombatCharacter::~C_BaseCombatCharacter()
|
||||||
{
|
{
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
DestroyGlowEffect();
|
DestroyGlowEffect();
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -64,9 +72,13 @@ void C_BaseCombatCharacter::OnPreDataChanged( DataUpdateType_t updateType )
|
||||||
{
|
{
|
||||||
BaseClass::OnPreDataChanged( updateType );
|
BaseClass::OnPreDataChanged( updateType );
|
||||||
|
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
m_bOldGlowEnabled = m_bGlowEnabled;
|
m_bOldGlowEnabled = m_bGlowEnabled;
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -76,12 +88,16 @@ void C_BaseCombatCharacter::OnDataChanged( DataUpdateType_t updateType )
|
||||||
{
|
{
|
||||||
BaseClass::OnDataChanged( updateType );
|
BaseClass::OnDataChanged( updateType );
|
||||||
|
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
if ( m_bOldGlowEnabled != m_bGlowEnabled )
|
if ( m_bOldGlowEnabled != m_bGlowEnabled )
|
||||||
{
|
{
|
||||||
UpdateGlowEffect();
|
UpdateGlowEffect();
|
||||||
}
|
}
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -102,6 +118,8 @@ void C_BaseCombatCharacter::DoMuzzleFlash()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose:
|
// Purpose:
|
||||||
|
@ -146,6 +164,8 @@ void C_BaseCombatCharacter::DestroyGlowEffect( void )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
|
|
||||||
IMPLEMENT_CLIENTCLASS(C_BaseCombatCharacter, DT_BaseCombatCharacter, CBaseCombatCharacter);
|
IMPLEMENT_CLIENTCLASS(C_BaseCombatCharacter, DT_BaseCombatCharacter, CBaseCombatCharacter);
|
||||||
|
|
||||||
|
@ -159,9 +179,14 @@ BEGIN_RECV_TABLE(C_BaseCombatCharacter, DT_BaseCombatCharacter)
|
||||||
RecvPropDataTable( "bcc_localdata", 0, 0, &REFERENCE_RECV_TABLE(DT_BCCLocalPlayerExclusive) ),
|
RecvPropDataTable( "bcc_localdata", 0, 0, &REFERENCE_RECV_TABLE(DT_BCCLocalPlayerExclusive) ),
|
||||||
RecvPropEHandle( RECVINFO( m_hActiveWeapon ) ),
|
RecvPropEHandle( RECVINFO( m_hActiveWeapon ) ),
|
||||||
RecvPropArray3( RECVINFO_ARRAY(m_hMyWeapons), RecvPropEHandle( RECVINFO( m_hMyWeapons[0] ) ) ),
|
RecvPropArray3( RECVINFO_ARRAY(m_hMyWeapons), RecvPropEHandle( RECVINFO( m_hMyWeapons[0] ) ) ),
|
||||||
|
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
RecvPropBool( RECVINFO( m_bGlowEnabled ) ),
|
RecvPropBool( RECVINFO( m_bGlowEnabled ) ),
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
|
|
||||||
#ifdef INVASION_CLIENT_DLL
|
#ifdef INVASION_CLIENT_DLL
|
||||||
RecvPropInt( RECVINFO( m_iPowerups ) ),
|
RecvPropInt( RECVINFO( m_iPowerups ) ),
|
||||||
|
|
|
@ -14,9 +14,14 @@
|
||||||
|
|
||||||
#include "shareddefs.h"
|
#include "shareddefs.h"
|
||||||
#include "c_baseflex.h"
|
#include "c_baseflex.h"
|
||||||
|
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
#include "glow_outline_effect.h"
|
#include "glow_outline_effect.h"
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
|
|
||||||
class C_BaseCombatWeapon;
|
class C_BaseCombatWeapon;
|
||||||
class C_WeaponCombatShield;
|
class C_WeaponCombatShield;
|
||||||
|
@ -94,10 +99,14 @@ public:
|
||||||
|
|
||||||
virtual void DoMuzzleFlash();
|
virtual void DoMuzzleFlash();
|
||||||
|
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
CGlowObject *GetGlowObject( void ){ return m_pGlowEffect; }
|
CGlowObject *GetGlowObject( void ){ return m_pGlowEffect; }
|
||||||
virtual void GetGlowEffectColor( float *r, float *g, float *b );
|
virtual void GetGlowEffectColor( float *r, float *g, float *b );
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -105,10 +114,14 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
virtual void UpdateGlowEffect( void );
|
virtual void UpdateGlowEffect( void );
|
||||||
virtual void DestroyGlowEffect( void );
|
virtual void DestroyGlowEffect( void );
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
|
|
||||||
int m_bloodColor; // color of blood particless
|
int m_bloodColor; // color of blood particless
|
||||||
|
|
||||||
|
@ -120,11 +133,15 @@ private:
|
||||||
CHandle<C_BaseCombatWeapon> m_hMyWeapons[MAX_WEAPONS];
|
CHandle<C_BaseCombatWeapon> m_hMyWeapons[MAX_WEAPONS];
|
||||||
CHandle< C_BaseCombatWeapon > m_hActiveWeapon;
|
CHandle< C_BaseCombatWeapon > m_hActiveWeapon;
|
||||||
|
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
bool m_bGlowEnabled;
|
bool m_bGlowEnabled;
|
||||||
bool m_bOldGlowEnabled;
|
bool m_bOldGlowEnabled;
|
||||||
CGlowObject *m_pGlowEffect;
|
CGlowObject *m_pGlowEffect;
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
|
|
||||||
private:
|
private:
|
||||||
C_BaseCombatCharacter( const C_BaseCombatCharacter & ); // not defined, not accessible
|
C_BaseCombatCharacter( const C_BaseCombatCharacter & ); // not defined, not accessible
|
||||||
|
|
|
@ -41,6 +41,12 @@
|
||||||
#include "inetchannelinfo.h"
|
#include "inetchannelinfo.h"
|
||||||
#include "proto_version.h"
|
#include "proto_version.h"
|
||||||
|
|
||||||
|
// FF --> hlstriker: Added
|
||||||
|
#ifdef GLOWS_ENABLE
|
||||||
|
#include "glow_outline_effect.h"
|
||||||
|
#endif // GLOWS_ENABLE
|
||||||
|
// FF <--
|
||||||
|
|
||||||
// memdbgon must be the last include file in a .cpp file!!!
|
// memdbgon must be the last include file in a .cpp file!!!
|
||||||
#include "tier0/memdbgon.h"
|
#include "tier0/memdbgon.h"
|
||||||
|
|
||||||
|
@ -477,6 +483,13 @@ BEGIN_RECV_TABLE_NOBASE(C_BaseEntity, DT_BaseEntity)
|
||||||
RecvPropArray3( RECVINFO_ARRAY(m_nModelIndexOverrides), RecvPropInt( RECVINFO(m_nModelIndexOverrides[0]) ) ),
|
RecvPropArray3( RECVINFO_ARRAY(m_nModelIndexOverrides), RecvPropInt( RECVINFO(m_nModelIndexOverrides[0]) ) ),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// FF --> hlstriker: Added
|
||||||
|
#ifdef GLOWS_ENABLE
|
||||||
|
RecvPropBool(RECVINFO(m_bGlowEnabled)),
|
||||||
|
RecvPropInt(RECVINFO(m_clrGlowColor)),
|
||||||
|
#endif // GLOWS_ENABLE
|
||||||
|
// FF <--
|
||||||
|
|
||||||
END_RECV_TABLE()
|
END_RECV_TABLE()
|
||||||
|
|
||||||
const float coordTolerance = 2.0f / (float)( 1 << COORD_FRACTIONAL_BITS );
|
const float coordTolerance = 2.0f / (float)( 1 << COORD_FRACTIONAL_BITS );
|
||||||
|
@ -957,6 +970,14 @@ C_BaseEntity::C_BaseEntity() :
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ParticleProp()->Init( this );
|
ParticleProp()->Init( this );
|
||||||
|
|
||||||
|
// FF --> hlstriker: Added
|
||||||
|
#ifdef GLOWS_ENABLE
|
||||||
|
m_pGlowEffect = NULL;
|
||||||
|
m_bGlowEnabled = false;
|
||||||
|
m_bOldGlowEnabled = false;
|
||||||
|
#endif GLOWS_ENABLE
|
||||||
|
// FF <--
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -967,6 +988,8 @@ C_BaseEntity::C_BaseEntity() :
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
C_BaseEntity::~C_BaseEntity()
|
C_BaseEntity::~C_BaseEntity()
|
||||||
{
|
{
|
||||||
|
DestroyGlowEffect(); // FF --> hlstriker: Added
|
||||||
|
|
||||||
Term();
|
Term();
|
||||||
ClearDataChangedEvent( m_DataChangeEventRef );
|
ClearDataChangedEvent( m_DataChangeEventRef );
|
||||||
#if !defined( NO_ENTITY_PREDICTION )
|
#if !defined( NO_ENTITY_PREDICTION )
|
||||||
|
@ -3254,12 +3277,22 @@ void C_BaseEntity::AddVisibleEntities()
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void C_BaseEntity::OnPreDataChanged( DataUpdateType_t type )
|
void C_BaseEntity::OnPreDataChanged( DataUpdateType_t type )
|
||||||
{
|
{
|
||||||
|
// FF --> hlstriker: Added
|
||||||
|
m_bOldGlowEnabled = m_bGlowEnabled;
|
||||||
|
m_clrOldGlowColor = m_clrGlowColor;
|
||||||
|
// FF <--
|
||||||
|
|
||||||
m_hOldMoveParent = m_hNetworkMoveParent;
|
m_hOldMoveParent = m_hNetworkMoveParent;
|
||||||
m_iOldParentAttachment = m_iParentAttachment;
|
m_iOldParentAttachment = m_iParentAttachment;
|
||||||
}
|
}
|
||||||
|
|
||||||
void C_BaseEntity::OnDataChanged( DataUpdateType_t type )
|
void C_BaseEntity::OnDataChanged( DataUpdateType_t type )
|
||||||
{
|
{
|
||||||
|
// FF --> hlstriker: Added
|
||||||
|
if ( m_bOldGlowEnabled != m_bGlowEnabled || m_clrOldGlowColor != m_clrGlowColor )
|
||||||
|
UpdateGlowEffect();
|
||||||
|
// FF <--
|
||||||
|
|
||||||
// See if it needs to allocate prediction stuff
|
// See if it needs to allocate prediction stuff
|
||||||
CheckInitPredictable( "OnDataChanged" );
|
CheckInitPredictable( "OnDataChanged" );
|
||||||
|
|
||||||
|
@ -3272,6 +3305,41 @@ void C_BaseEntity::OnDataChanged( DataUpdateType_t type )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FF --> hlstriker: Added
|
||||||
|
void C_BaseEntity::GetGlowEffectColor( float *r, float *g, float *b, float *a )
|
||||||
|
{
|
||||||
|
*r = m_clrGlowColor.r / 255.0f;
|
||||||
|
*g = m_clrGlowColor.g / 255.0f;
|
||||||
|
*b = m_clrGlowColor.b / 255.0f;
|
||||||
|
*a = m_clrGlowColor.a / 255.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
void C_BaseEntity::UpdateGlowEffect( void )
|
||||||
|
{
|
||||||
|
// destroy the existing effect
|
||||||
|
if ( m_pGlowEffect )
|
||||||
|
DestroyGlowEffect();
|
||||||
|
|
||||||
|
// create a new effect
|
||||||
|
if ( m_bGlowEnabled )
|
||||||
|
{
|
||||||
|
float r, g, b, a;
|
||||||
|
GetGlowEffectColor( &r, &g, &b, &a );
|
||||||
|
|
||||||
|
m_pGlowEffect = new CGlowObject( this, Vector( r, g, b ), a, true, true );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void C_BaseEntity::DestroyGlowEffect( void )
|
||||||
|
{
|
||||||
|
if ( m_pGlowEffect )
|
||||||
|
{
|
||||||
|
delete m_pGlowEffect;
|
||||||
|
m_pGlowEffect = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// FF <--
|
||||||
|
|
||||||
ClientThinkHandle_t C_BaseEntity::GetThinkHandle()
|
ClientThinkHandle_t C_BaseEntity::GetThinkHandle()
|
||||||
{
|
{
|
||||||
return m_hThink;
|
return m_hThink;
|
||||||
|
|
|
@ -36,6 +36,12 @@
|
||||||
#include "toolframework/itoolentity.h"
|
#include "toolframework/itoolentity.h"
|
||||||
#include "tier0/threadtools.h"
|
#include "tier0/threadtools.h"
|
||||||
|
|
||||||
|
// FF --> hlstriker: Added
|
||||||
|
#ifdef GLOWS_ENABLE
|
||||||
|
class CGlowObject;
|
||||||
|
#endif // GLOWS_ENABLE
|
||||||
|
// FF <--
|
||||||
|
|
||||||
class C_Team;
|
class C_Team;
|
||||||
class IPhysicsObject;
|
class IPhysicsObject;
|
||||||
class IClientVehicle;
|
class IClientVehicle;
|
||||||
|
@ -1687,6 +1693,21 @@ protected:
|
||||||
RenderMode_t m_PreviousRenderMode;
|
RenderMode_t m_PreviousRenderMode;
|
||||||
color32 m_PreviousRenderColor;
|
color32 m_PreviousRenderColor;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// FF --> hlstriker: Added
|
||||||
|
#ifdef GLOWS_ENABLE
|
||||||
|
private:
|
||||||
|
void UpdateGlowEffect( void );
|
||||||
|
void DestroyGlowEffect( void );
|
||||||
|
void GetGlowEffectColor( float *r, float *g, float *b, float *a );
|
||||||
|
|
||||||
|
CGlowObject *m_pGlowEffect;
|
||||||
|
bool m_bGlowEnabled;
|
||||||
|
bool m_bOldGlowEnabled;
|
||||||
|
color32 m_clrGlowColor;
|
||||||
|
color32 m_clrOldGlowColor;
|
||||||
|
#endif // GLOWS_ENABLE
|
||||||
|
// FF <--
|
||||||
};
|
};
|
||||||
|
|
||||||
EXTERN_RECV_TABLE(DT_BaseEntity);
|
EXTERN_RECV_TABLE(DT_BaseEntity);
|
||||||
|
|
|
@ -65,6 +65,12 @@ extern ConVar replay_rendersetting_renderglow;
|
||||||
#include "econ_item_description.h"
|
#include "econ_item_description.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// FF --> hlstriker: Added
|
||||||
|
#ifdef GLOWS_ENABLE
|
||||||
|
#include "glow_outline_effect.h"
|
||||||
|
#endif // GLOWS_ENABLE
|
||||||
|
// FF <--
|
||||||
|
|
||||||
// memdbgon must be the last include file in a .cpp file!!!
|
// memdbgon must be the last include file in a .cpp file!!!
|
||||||
#include "tier0/memdbgon.h"
|
#include "tier0/memdbgon.h"
|
||||||
|
|
||||||
|
@ -739,13 +745,16 @@ int ClientModeShared::HudElementKeyInput( int down, ButtonCode_t keynum, const c
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose:
|
// Purpose:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
bool ClientModeShared::DoPostScreenSpaceEffects( const CViewSetup *pSetup )
|
bool ClientModeShared::DoPostScreenSpaceEffects( const CViewSetup *pSetup )
|
||||||
{
|
{
|
||||||
g_GlowObjectManager.RenderGlowEffects( pSetup, 0 /*GetSplitScreenPlayerSlot()*/ ); // FF --> hlstriker: Added
|
// FF --> hlstriker: Added
|
||||||
|
#ifdef GLOWS_ENABLE
|
||||||
|
g_GlowObjectManager.RenderGlowEffects( pSetup, 0 /*GetSplitScreenPlayerSlot()*/ );
|
||||||
|
#endif // GLOWS_ENABLE
|
||||||
|
// FF <--
|
||||||
|
|
||||||
#if defined( REPLAY_ENABLED )
|
#if defined( REPLAY_ENABLED )
|
||||||
if ( engine->IsPlayingDemo() )
|
if ( engine->IsPlayingDemo() )
|
||||||
|
|
|
@ -190,9 +190,14 @@ END_SEND_TABLE();
|
||||||
// This table encodes the CBaseCombatCharacter
|
// This table encodes the CBaseCombatCharacter
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
IMPLEMENT_SERVERCLASS_ST(CBaseCombatCharacter, DT_BaseCombatCharacter)
|
IMPLEMENT_SERVERCLASS_ST(CBaseCombatCharacter, DT_BaseCombatCharacter)
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
SendPropBool( SENDINFO( m_bGlowEnabled ) ),
|
SendPropBool( SENDINFO( m_bGlowEnabled ) ),
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
|
|
||||||
// Data that only gets sent to the local player.
|
// Data that only gets sent to the local player.
|
||||||
SendPropDataTable( "bcc_localdata", 0, &REFERENCE_SEND_TABLE(DT_BCCLocalPlayerExclusive), SendProxy_SendBaseCombatCharacterLocalDataTable ),
|
SendPropDataTable( "bcc_localdata", 0, &REFERENCE_SEND_TABLE(DT_BCCLocalPlayerExclusive), SendProxy_SendBaseCombatCharacterLocalDataTable ),
|
||||||
|
|
||||||
|
@ -744,9 +749,13 @@ CBaseCombatCharacter::CBaseCombatCharacter( void )
|
||||||
|
|
||||||
m_bForceServerRagdoll = ai_force_serverside_ragdoll.GetBool();
|
m_bForceServerRagdoll = ai_force_serverside_ragdoll.GetBool();
|
||||||
|
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
m_bGlowEnabled.Set( false );
|
m_bGlowEnabled.Set( false );
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
@ -851,9 +860,13 @@ void CBaseCombatCharacter::UpdateOnRemove( void )
|
||||||
SetOwnerEntity( NULL );
|
SetOwnerEntity( NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
RemoveGlowEffect();
|
RemoveGlowEffect();
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
|
|
||||||
// Chain at end to mimic destructor unwind order
|
// Chain at end to mimic destructor unwind order
|
||||||
BaseClass::UpdateOnRemove();
|
BaseClass::UpdateOnRemove();
|
||||||
|
@ -1677,9 +1690,13 @@ void CBaseCombatCharacter::Event_Killed( const CTakeDamageInfo &info )
|
||||||
TheNextBots().OnKilled( this, info );
|
TheNextBots().OnKilled( this, info );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
RemoveGlowEffect();
|
RemoveGlowEffect();
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBaseCombatCharacter::Event_Dying( const CTakeDamageInfo &info )
|
void CBaseCombatCharacter::Event_Dying( const CTakeDamageInfo &info )
|
||||||
|
@ -3230,6 +3247,8 @@ float CBaseCombatCharacter::GetSpreadBias( CBaseCombatWeapon *pWeapon, CBaseEnti
|
||||||
return 1.0;
|
return 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose:
|
// Purpose:
|
||||||
|
@ -3256,6 +3275,8 @@ bool CBaseCombatCharacter::IsGlowEffectActive( void )
|
||||||
return m_bGlowEnabled;
|
return m_bGlowEnabled;
|
||||||
}
|
}
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Assume everyone is average with every weapon. Override this to make exceptions.
|
// Assume everyone is average with every weapon. Override this to make exceptions.
|
||||||
|
@ -3522,9 +3543,13 @@ void CBaseCombatCharacter::ChangeTeam( int iTeamNum )
|
||||||
// old team member no longer in the nav mesh
|
// old team member no longer in the nav mesh
|
||||||
ClearLastKnownArea();
|
ClearLastKnownArea();
|
||||||
|
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
RemoveGlowEffect();
|
RemoveGlowEffect();
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
|
|
||||||
BaseClass::ChangeTeam( iTeamNum );
|
BaseClass::ChangeTeam( iTeamNum );
|
||||||
}
|
}
|
||||||
|
|
|
@ -412,12 +412,16 @@ public:
|
||||||
// -----------------------
|
// -----------------------
|
||||||
virtual void OnPursuedBy( INextBot * RESTRICT pPursuer ){} // called every frame while pursued by a bot in DirectChase.
|
virtual void OnPursuedBy( INextBot * RESTRICT pPursuer ){} // called every frame while pursued by a bot in DirectChase.
|
||||||
|
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
// Glows
|
// Glows
|
||||||
void AddGlowEffect( void );
|
void AddGlowEffect( void );
|
||||||
void RemoveGlowEffect( void );
|
void RemoveGlowEffect( void );
|
||||||
bool IsGlowEffectActive( void );
|
bool IsGlowEffectActive( void );
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
|
|
||||||
#ifdef INVASION_DLL
|
#ifdef INVASION_DLL
|
||||||
public:
|
public:
|
||||||
|
@ -456,16 +460,22 @@ protected:
|
||||||
public:
|
public:
|
||||||
CNetworkVar( float, m_flNextAttack ); // cannot attack again until this time
|
CNetworkVar( float, m_flNextAttack ); // cannot attack again until this time
|
||||||
|
|
||||||
|
// FF --> hlstriker: Commented.
|
||||||
|
/*
|
||||||
#ifdef GLOWS_ENABLE
|
#ifdef GLOWS_ENABLE
|
||||||
protected:
|
protected:
|
||||||
CNetworkVar( bool, m_bGlowEnabled );
|
CNetworkVar( bool, m_bGlowEnabled );
|
||||||
#endif // GLOWS_ENABLE
|
#endif // GLOWS_ENABLE
|
||||||
|
*/
|
||||||
|
// FF <--
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Hull_t m_eHull;
|
Hull_t m_eHull;
|
||||||
|
|
||||||
void UpdateGlowEffect( void );
|
// FF --> hlstriker: Commented because they aren't used.
|
||||||
void DestroyGlowEffect( void );
|
//void UpdateGlowEffect( void );
|
||||||
|
//void DestroyGlowEffect( void );
|
||||||
|
// FF <--
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_bloodColor; // color of blood particless
|
int m_bloodColor; // color of blood particless
|
||||||
|
|
|
@ -306,6 +306,13 @@ IMPLEMENT_SERVERCLASS_ST_NOBASE( CBaseEntity, DT_BaseEntity )
|
||||||
SendPropArray3( SENDINFO_ARRAY3(m_nModelIndexOverrides), SendPropInt( SENDINFO_ARRAY(m_nModelIndexOverrides), SP_MODEL_INDEX_BITS, SPROP_UNSIGNED ) ),
|
SendPropArray3( SENDINFO_ARRAY3(m_nModelIndexOverrides), SendPropInt( SENDINFO_ARRAY(m_nModelIndexOverrides), SP_MODEL_INDEX_BITS, SPROP_UNSIGNED ) ),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// FF --> hlstriker: Added
|
||||||
|
#ifdef GLOWS_ENABLE
|
||||||
|
SendPropBool( SENDINFO( m_bGlowEnabled ) ),
|
||||||
|
SendPropInt( SENDINFO( m_clrGlowColor ) ),
|
||||||
|
#endif // GLOWS_ENABLE
|
||||||
|
// FF <--
|
||||||
|
|
||||||
END_SEND_TABLE()
|
END_SEND_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
@ -412,6 +419,14 @@ CBaseEntity::CBaseEntity( bool bServerOnly )
|
||||||
#ifndef _XBOX
|
#ifndef _XBOX
|
||||||
AddEFlags( EFL_USE_PARTITION_WHEN_NOT_SOLID );
|
AddEFlags( EFL_USE_PARTITION_WHEN_NOT_SOLID );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// FF --> hlstriker: Added
|
||||||
|
m_bGlowEnabled.Set( false );
|
||||||
|
m_clrGlowColor.SetR( 255 );
|
||||||
|
m_clrGlowColor.SetG( 255 );
|
||||||
|
m_clrGlowColor.SetB( 255 );
|
||||||
|
m_clrGlowColor.SetA( 175 );
|
||||||
|
// FF <--
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -1607,6 +1622,8 @@ int CBaseEntity::VPhysicsTakeDamage( const CTakeDamageInfo &info )
|
||||||
// Character killed (only fired once)
|
// Character killed (only fired once)
|
||||||
void CBaseEntity::Event_Killed( const CTakeDamageInfo &info )
|
void CBaseEntity::Event_Killed( const CTakeDamageInfo &info )
|
||||||
{
|
{
|
||||||
|
RemoveGlowEffect(); // FF --> hlstriker: Added
|
||||||
|
|
||||||
if( info.GetAttacker() )
|
if( info.GetAttacker() )
|
||||||
{
|
{
|
||||||
info.GetAttacker()->Event_KilledOther(this, info);
|
info.GetAttacker()->Event_KilledOther(this, info);
|
||||||
|
@ -2054,6 +2071,8 @@ void CBaseEntity::UpdateOnRemove( void )
|
||||||
modelinfo->ReleaseDynamicModel( m_nModelIndex ); // no-op if not dynamic
|
modelinfo->ReleaseDynamicModel( m_nModelIndex ); // no-op if not dynamic
|
||||||
m_nModelIndex = -1;
|
m_nModelIndex = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RemoveGlowEffect(); // FF --> hlstriker: Added
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -7294,6 +7313,29 @@ void CBaseEntity::SetCollisionBoundsFromModel()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FF --> hlstriker: Added
|
||||||
|
#ifdef GLOWS_ENABLE
|
||||||
|
void CBaseEntity::AddGlowEffect( int red, int green, int blue, int alpha )
|
||||||
|
{
|
||||||
|
SetTransmitState( FL_EDICT_ALWAYS );
|
||||||
|
m_clrGlowColor.SetR( red );
|
||||||
|
m_clrGlowColor.SetG( green );
|
||||||
|
m_clrGlowColor.SetB( blue );
|
||||||
|
m_clrGlowColor.SetA( alpha );
|
||||||
|
m_bGlowEnabled.Set( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
void CBaseEntity::RemoveGlowEffect( void )
|
||||||
|
{
|
||||||
|
m_bGlowEnabled.Set( false );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CBaseEntity::IsGlowEffectActive( void )
|
||||||
|
{
|
||||||
|
return m_bGlowEnabled;
|
||||||
|
}
|
||||||
|
#endif // GLOWS_ENABLE
|
||||||
|
// FF <--
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Purpose: Create an NPC of the given type
|
// Purpose: Create an NPC of the given type
|
||||||
|
|
|
@ -1791,6 +1791,19 @@ public:
|
||||||
{
|
{
|
||||||
return s_bAbsQueriesValid;
|
return s_bAbsQueriesValid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FF --> hlstriker: Added.
|
||||||
|
#ifdef GLOWS_ENABLE
|
||||||
|
protected:
|
||||||
|
CNetworkVar( bool, m_bGlowEnabled );
|
||||||
|
CNetworkColor32( m_clrGlowColor );
|
||||||
|
|
||||||
|
public:
|
||||||
|
void AddGlowEffect( int red, int green, int blue, int alpha );
|
||||||
|
void RemoveGlowEffect( void );
|
||||||
|
bool IsGlowEffectActive( void );
|
||||||
|
#endif // GLOWS_ENABLE
|
||||||
|
// FF <--
|
||||||
};
|
};
|
||||||
|
|
||||||
// Send tables exposed in this module.
|
// Send tables exposed in this module.
|
||||||
|
|
|
@ -419,8 +419,6 @@ void CFF_SV_Player::SetPlayerTeamModel( void )
|
||||||
SetupPlayerSoundsByModel( szModelName );
|
SetupPlayerSoundsByModel( szModelName );
|
||||||
|
|
||||||
m_flNextModelChangeTime = gpGlobals->curtime + MODEL_CHANGE_INTERVAL;
|
m_flNextModelChangeTime = gpGlobals->curtime + MODEL_CHANGE_INTERVAL;
|
||||||
|
|
||||||
AddGlowEffect();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFF_SV_Player::SetPlayerModel( void )
|
void CFF_SV_Player::SetPlayerModel( void )
|
||||||
|
|
Loading…
Reference in New Issue