mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-08 11:01:33 +00:00
Moved Glow Code to CBaseAnimating
This commit is contained in:
parent
ee424d0fc2
commit
7506c3383d
12 changed files with 166 additions and 332 deletions
|
@ -201,6 +201,10 @@ IMPLEMENT_CLIENTCLASS_DT(C_BaseAnimating, DT_BaseAnimating, CBaseAnimating)
|
|||
RecvPropFloat( RECVINFO( m_fadeMaxDist ) ),
|
||||
RecvPropFloat( RECVINFO( m_flFadeScale ) ),
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
RecvPropBool( RECVINFO( m_bGlowEnabled ) ),
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
END_RECV_TABLE()
|
||||
|
||||
BEGIN_PREDICTION_DATA( C_BaseAnimating )
|
||||
|
@ -734,6 +738,12 @@ C_BaseAnimating::C_BaseAnimating() :
|
|||
Q_memset(&m_mouth, 0, sizeof(m_mouth));
|
||||
m_flCycle = 0;
|
||||
m_flOldCycle = 0;
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
m_pGlowEffect = NULL;
|
||||
m_bGlowEnabled = false;
|
||||
m_bOldGlowEnabled = false;
|
||||
#endif // GLOWS_ENABLE
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -764,6 +774,10 @@ C_BaseAnimating::~C_BaseAnimating()
|
|||
m_pAttachedTo->RemoveBoneAttachment( this );
|
||||
m_pAttachedTo = NULL;
|
||||
}
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
DestroyGlowEffect();
|
||||
#endif // GLOWS_ENABLE
|
||||
}
|
||||
|
||||
bool C_BaseAnimating::UsesPowerOfTwoFrameBufferTexture( void )
|
||||
|
@ -4517,6 +4531,10 @@ void C_BaseAnimating::OnPreDataChanged( DataUpdateType_t updateType )
|
|||
BaseClass::OnPreDataChanged( updateType );
|
||||
|
||||
m_bLastClientSideFrameReset = m_bClientSideFrameReset;
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
m_bOldGlowEnabled = m_bGlowEnabled;
|
||||
#endif // GLOWS_ENABLE
|
||||
}
|
||||
|
||||
void C_BaseAnimating::ForceSetupBonesAtTime( matrix3x4_t *pBonesOut, float flTime )
|
||||
|
@ -4789,6 +4807,13 @@ void C_BaseAnimating::OnDataChanged( DataUpdateType_t updateType )
|
|||
delete m_pRagdollInfo;
|
||||
m_pRagdollInfo = NULL;
|
||||
}
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
if ( m_bOldGlowEnabled != m_bGlowEnabled )
|
||||
{
|
||||
UpdateGlowEffect();
|
||||
}
|
||||
#endif // GLOWS_ENABLE
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -6431,3 +6456,48 @@ void C_BaseAnimating::MoveBoneAttachments( C_BaseAnimating* attachTarget )
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void C_BaseAnimating::GetGlowEffectColor( float *r, float *g, float *b )
|
||||
{
|
||||
*r = 0.76f;
|
||||
*g = 0.76f;
|
||||
*b = 0.76f;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void C_BaseAnimating::UpdateGlowEffect( void )
|
||||
{
|
||||
// destroy the existing effect
|
||||
if ( m_pGlowEffect )
|
||||
{
|
||||
DestroyGlowEffect();
|
||||
}
|
||||
|
||||
// create a new effect
|
||||
if ( m_bGlowEnabled )
|
||||
{
|
||||
float r, g, b;
|
||||
GetGlowEffectColor( &r, &g, &b );
|
||||
|
||||
m_pGlowEffect = new CGlowObject( this, Vector( r, g, b ), 1.0, true );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void C_BaseAnimating::DestroyGlowEffect( void )
|
||||
{
|
||||
if ( m_pGlowEffect )
|
||||
{
|
||||
delete m_pGlowEffect;
|
||||
m_pGlowEffect = NULL;
|
||||
}
|
||||
}
|
||||
#endif // GLOWS_ENABLE
|
||||
|
|
|
@ -26,6 +26,9 @@
|
|||
#include "ragdoll_shared.h"
|
||||
#include "tier0/threadtools.h"
|
||||
#include "datacache/idatacache.h"
|
||||
#ifdef GLOWS_ENABLE
|
||||
#include "glow_outline_effect.h"
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
#define LIPSYNC_POSEPARAM_NAME "mouth"
|
||||
#define NUM_HITBOX_FIRES 10
|
||||
|
@ -445,6 +448,11 @@ public:
|
|||
|
||||
virtual bool IsViewModel() const;
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
CGlowObject *GetGlowObject( void ){ return m_pGlowEffect; }
|
||||
virtual void GetGlowEffectColor( float *r, float *g, float *b );
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
protected:
|
||||
// View models scale their attachment positions to account for FOV. To get the unmodified
|
||||
// attachment position (like if you're rendering something else during the view model's DrawModel call),
|
||||
|
@ -463,6 +471,11 @@ protected:
|
|||
|
||||
virtual bool CalcAttachments();
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
virtual void UpdateGlowEffect( void );
|
||||
virtual void DestroyGlowEffect( void );
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
private:
|
||||
// This method should return true if the bones have changed + SetupBones needs to be called
|
||||
virtual float LastBoneChangedTime() { return FLT_MAX; }
|
||||
|
@ -621,6 +634,12 @@ private:
|
|||
bool m_bDynamicModelPending;
|
||||
bool m_bResetSequenceInfoOnLoad;
|
||||
CRefCountedModelIndex m_AutoRefModelIndex;
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
bool m_bGlowEnabled;
|
||||
bool m_bOldGlowEnabled;
|
||||
CGlowObject *m_pGlowEffect;
|
||||
#endif // GLOWS_ENABLE
|
||||
public:
|
||||
void EnableDynamicModels() { m_bDynamicModelAllowed = true; }
|
||||
bool IsDynamicModelLoading() const { return m_bDynamicModelPending; }
|
||||
|
|
|
@ -29,12 +29,6 @@ C_BaseCombatCharacter::C_BaseCombatCharacter()
|
|||
{
|
||||
m_iAmmo.Set( i, 0 );
|
||||
}
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
m_pGlowEffect = NULL;
|
||||
m_bGlowEnabled = false;
|
||||
m_bOldGlowEnabled = false;
|
||||
#endif // GLOWS_ENABLE
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -42,9 +36,6 @@ C_BaseCombatCharacter::C_BaseCombatCharacter()
|
|||
//-----------------------------------------------------------------------------
|
||||
C_BaseCombatCharacter::~C_BaseCombatCharacter()
|
||||
{
|
||||
#ifdef GLOWS_ENABLE
|
||||
DestroyGlowEffect();
|
||||
#endif // GLOWS_ENABLE
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -63,10 +54,6 @@ int C_BaseCombatCharacter::GetAmmoCount( char *szName ) const
|
|||
void C_BaseCombatCharacter::OnPreDataChanged( DataUpdateType_t updateType )
|
||||
{
|
||||
BaseClass::OnPreDataChanged( updateType );
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
m_bOldGlowEnabled = m_bGlowEnabled;
|
||||
#endif // GLOWS_ENABLE
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -75,13 +62,6 @@ void C_BaseCombatCharacter::OnPreDataChanged( DataUpdateType_t updateType )
|
|||
void C_BaseCombatCharacter::OnDataChanged( DataUpdateType_t updateType )
|
||||
{
|
||||
BaseClass::OnDataChanged( updateType );
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
if ( m_bOldGlowEnabled != m_bGlowEnabled )
|
||||
{
|
||||
UpdateGlowEffect();
|
||||
}
|
||||
#endif // GLOWS_ENABLE
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -102,51 +82,6 @@ void C_BaseCombatCharacter::DoMuzzleFlash()
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void C_BaseCombatCharacter::GetGlowEffectColor( float *r, float *g, float *b )
|
||||
{
|
||||
*r = 0.76f;
|
||||
*g = 0.76f;
|
||||
*b = 0.76f;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void C_BaseCombatCharacter::UpdateGlowEffect( void )
|
||||
{
|
||||
// destroy the existing effect
|
||||
if ( m_pGlowEffect )
|
||||
{
|
||||
DestroyGlowEffect();
|
||||
}
|
||||
|
||||
// create a new effect
|
||||
if ( m_bGlowEnabled )
|
||||
{
|
||||
float r, g, b;
|
||||
GetGlowEffectColor( &r, &g, &b );
|
||||
|
||||
m_pGlowEffect = new CGlowObject( this, Vector( r, g, b ), 1.0, true );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void C_BaseCombatCharacter::DestroyGlowEffect( void )
|
||||
{
|
||||
if ( m_pGlowEffect )
|
||||
{
|
||||
delete m_pGlowEffect;
|
||||
m_pGlowEffect = NULL;
|
||||
}
|
||||
}
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
IMPLEMENT_CLIENTCLASS(C_BaseCombatCharacter, DT_BaseCombatCharacter, CBaseCombatCharacter);
|
||||
|
||||
// Only send active weapon index to local player
|
||||
|
@ -159,9 +94,6 @@ BEGIN_RECV_TABLE(C_BaseCombatCharacter, DT_BaseCombatCharacter)
|
|||
RecvPropDataTable( "bcc_localdata", 0, 0, &REFERENCE_RECV_TABLE(DT_BCCLocalPlayerExclusive) ),
|
||||
RecvPropEHandle( RECVINFO( m_hActiveWeapon ) ),
|
||||
RecvPropArray3( RECVINFO_ARRAY(m_hMyWeapons), RecvPropEHandle( RECVINFO( m_hMyWeapons[0] ) ) ),
|
||||
#ifdef GLOWS_ENABLE
|
||||
RecvPropBool( RECVINFO( m_bGlowEnabled ) ),
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
#ifdef INVASION_CLIENT_DLL
|
||||
RecvPropInt( RECVINFO( m_iPowerups ) ),
|
||||
|
|
|
@ -14,9 +14,6 @@
|
|||
|
||||
#include "shareddefs.h"
|
||||
#include "c_baseflex.h"
|
||||
#ifdef GLOWS_ENABLE
|
||||
#include "glow_outline_effect.h"
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
class C_BaseCombatWeapon;
|
||||
class C_WeaponCombatShield;
|
||||
|
@ -94,22 +91,12 @@ public:
|
|||
|
||||
virtual void DoMuzzleFlash();
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
CGlowObject *GetGlowObject( void ){ return m_pGlowEffect; }
|
||||
virtual void GetGlowEffectColor( float *r, float *g, float *b );
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
public:
|
||||
|
||||
float m_flNextAttack;
|
||||
|
||||
protected:
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
virtual void UpdateGlowEffect( void );
|
||||
virtual void DestroyGlowEffect( void );
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
int m_bloodColor; // color of blood particless
|
||||
|
||||
private:
|
||||
|
@ -120,12 +107,6 @@ private:
|
|||
CHandle<C_BaseCombatWeapon> m_hMyWeapons[MAX_WEAPONS];
|
||||
CHandle< C_BaseCombatWeapon > m_hActiveWeapon;
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
bool m_bGlowEnabled;
|
||||
bool m_bOldGlowEnabled;
|
||||
CGlowObject *m_pGlowEffect;
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
private:
|
||||
C_BaseCombatCharacter( const C_BaseCombatCharacter & ); // not defined, not accessible
|
||||
|
||||
|
|
|
@ -22,29 +22,15 @@ IMPLEMENT_NETWORKCLASS_ALIASED( DynamicProp, DT_DynamicProp )
|
|||
|
||||
BEGIN_NETWORK_TABLE( CDynamicProp, DT_DynamicProp )
|
||||
RecvPropBool(RECVINFO(m_bUseHitboxesForRenderBox)),
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
RecvPropBool(RECVINFO(m_bGlowEnabled)),
|
||||
#endif // GLOWS_ENABLE
|
||||
END_NETWORK_TABLE()
|
||||
|
||||
C_DynamicProp::C_DynamicProp( void )
|
||||
{
|
||||
m_iCachedFrameCount = -1;
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
m_pGlowEffect = NULL;
|
||||
m_bGlowEnabled = false;
|
||||
m_bOldGlowEnabled = false;
|
||||
#endif // GLOWS_ENABLE
|
||||
}
|
||||
|
||||
C_DynamicProp::~C_DynamicProp( void )
|
||||
{
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
DestroyGlowEffect();
|
||||
#endif // GLOWS_ENABLE
|
||||
}
|
||||
|
||||
bool C_DynamicProp::TestBoneFollowers( const Ray_t &ray, unsigned int fContentsMask, trace_t& tr )
|
||||
|
@ -81,68 +67,7 @@ bool C_DynamicProp::TestCollision( const Ray_t &ray, unsigned int fContentsMask,
|
|||
}
|
||||
return BaseClass::TestCollision( ray, fContentsMask, tr );
|
||||
}
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
void C_DynamicProp::OnPreDataChanged(DataUpdateType_t updateType)
|
||||
{
|
||||
BaseClass::OnPreDataChanged(updateType);
|
||||
|
||||
|
||||
m_bOldGlowEnabled = m_bGlowEnabled;
|
||||
|
||||
}
|
||||
void C_DynamicProp::OnDataChanged(DataUpdateType_t updateType)
|
||||
{
|
||||
BaseClass::OnDataChanged(updateType);
|
||||
|
||||
if (m_bOldGlowEnabled != m_bGlowEnabled)
|
||||
{
|
||||
UpdateGlowEffect();
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void C_DynamicProp::GetGlowEffectColor(float *r, float *g, float *b)
|
||||
{
|
||||
*r = 0.76f;
|
||||
*g = 0.76f;
|
||||
*b = 0.76f;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void C_DynamicProp::UpdateGlowEffect(void)
|
||||
{
|
||||
// destroy the existing effect
|
||||
if (m_pGlowEffect)
|
||||
{
|
||||
DestroyGlowEffect();
|
||||
}
|
||||
|
||||
// create a new effect
|
||||
if (m_bGlowEnabled)
|
||||
{
|
||||
float r, g, b;
|
||||
GetGlowEffectColor(&r, &g, &b);
|
||||
|
||||
m_pGlowEffect = new CGlowObject(this, Vector(r, g, b), 1.0, true);
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void C_DynamicProp::DestroyGlowEffect(void)
|
||||
{
|
||||
if (m_pGlowEffect)
|
||||
{
|
||||
delete m_pGlowEffect;
|
||||
m_pGlowEffect = NULL;
|
||||
}
|
||||
}
|
||||
#endif // GLOWS_ENABLE
|
||||
//-----------------------------------------------------------------------------
|
||||
// implements these so ragdolls can handle frustum culling & leaf visibility
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -12,10 +12,7 @@
|
|||
|
||||
#include "c_breakableprop.h"
|
||||
#include "props_shared.h"
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
#include "glow_outline_effect.h"
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
#define CDynamicProp C_DynamicProp
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -31,21 +28,11 @@ public:
|
|||
C_DynamicProp( void );
|
||||
~C_DynamicProp( void );
|
||||
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
virtual void OnPreDataChanged(DataUpdateType_t updateType);
|
||||
virtual void OnDataChanged(DataUpdateType_t updateType);
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
void GetRenderBounds( Vector& theMins, Vector& theMaxs );
|
||||
unsigned int ComputeClientSideAnimationFlags();
|
||||
bool TestBoneFollowers( const Ray_t &ray, unsigned int fContentsMask, trace_t& tr );
|
||||
bool TestCollision( const Ray_t &ray, unsigned int fContentsMask, trace_t& tr );
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
CGlowObject *GetGlowObject(void){ return m_pGlowEffect; }
|
||||
virtual void GetGlowEffectColor(float *r, float *g, float *b);
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
private:
|
||||
C_DynamicProp( const C_DynamicProp & );
|
||||
|
||||
|
@ -53,18 +40,6 @@ private:
|
|||
int m_iCachedFrameCount;
|
||||
Vector m_vecCachedRenderMins;
|
||||
Vector m_vecCachedRenderMaxs;
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
bool m_bGlowEnabled;
|
||||
bool m_bOldGlowEnabled;
|
||||
CGlowObject *m_pGlowEffect;
|
||||
#endif // GLOWS_ENABLE
|
||||
protected:
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
virtual void UpdateGlowEffect(void);
|
||||
virtual void DestroyGlowEffect(void);
|
||||
#endif // GLOWS_ENABLE
|
||||
};
|
||||
|
||||
#endif // C_PROPS_H
|
||||
|
|
|
@ -215,6 +215,11 @@ BEGIN_DATADESC( CBaseAnimating )
|
|||
|
||||
DEFINE_FIELD( m_fBoneCacheFlags, FIELD_SHORT ),
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
DEFINE_INPUTFUNC( FIELD_VOID, "EnableGlow", InputEnableGlow ),
|
||||
DEFINE_INPUTFUNC( FIELD_VOID, "DisableGlow", InputDisableGlow ),
|
||||
#endif
|
||||
|
||||
END_DATADESC()
|
||||
|
||||
// Sendtable for fields we don't want to send to clientside animating entities
|
||||
|
@ -261,6 +266,10 @@ IMPLEMENT_SERVERCLASS_ST(CBaseAnimating, DT_BaseAnimating)
|
|||
SendPropFloat( SENDINFO( m_fadeMaxDist ), 0, SPROP_NOSCALE ),
|
||||
SendPropFloat( SENDINFO( m_flFadeScale ), 0, SPROP_NOSCALE ),
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
SendPropBool( SENDINFO( m_bGlowEnabled ) ),
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
END_SEND_TABLE()
|
||||
|
||||
|
||||
|
@ -288,6 +297,10 @@ CBaseAnimating::CBaseAnimating()
|
|||
m_fadeMaxDist = 0;
|
||||
m_flFadeScale = 0.0f;
|
||||
m_fBoneCacheFlags = 0;
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
m_bGlowEnabled.Set( false );
|
||||
#endif // GLOWS_ENABLE
|
||||
}
|
||||
|
||||
CBaseAnimating::~CBaseAnimating()
|
||||
|
@ -296,6 +309,10 @@ CBaseAnimating::~CBaseAnimating()
|
|||
delete m_pIk;
|
||||
UnlockStudioHdr();
|
||||
delete m_pStudioHdr;
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
RemoveGlowEffect();
|
||||
#endif // GLOWS_ENABLE
|
||||
}
|
||||
|
||||
void CBaseAnimating::Precache()
|
||||
|
@ -3595,3 +3612,39 @@ CStudioHdr *CBaseAnimating::OnNewModel()
|
|||
|
||||
return hdr;
|
||||
}
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CBaseAnimating::AddGlowEffect( void )
|
||||
{
|
||||
SetTransmitState( FL_EDICT_ALWAYS );
|
||||
m_bGlowEnabled.Set( true );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CBaseAnimating::RemoveGlowEffect( void )
|
||||
{
|
||||
m_bGlowEnabled.Set( false );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CBaseAnimating::IsGlowEffectActive( void )
|
||||
{
|
||||
return m_bGlowEnabled;
|
||||
}
|
||||
|
||||
void CBaseAnimating::InputEnableGlow( inputdata_t &inputdata )
|
||||
{
|
||||
AddGlowEffect();
|
||||
}
|
||||
void CBaseAnimating::InputDisableGlow( inputdata_t &inputdata )
|
||||
{
|
||||
RemoveGlowEffect();
|
||||
}
|
||||
#endif // GLOWS_ENABLE
|
|
@ -331,6 +331,15 @@ public:
|
|||
|
||||
bool PrefetchSequence( int iSequence );
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
// Glows
|
||||
void AddGlowEffect( void );
|
||||
void RemoveGlowEffect( void );
|
||||
bool IsGlowEffectActive( void );
|
||||
void InputEnableGlow( inputdata_t &inputdata );
|
||||
void InputDisableGlow( inputdata_t &inputdata );
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
private:
|
||||
void LockStudioHdr();
|
||||
void UnlockStudioHdr();
|
||||
|
@ -342,6 +351,11 @@ private:
|
|||
|
||||
bool CanSkipAnimation( void );
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
void UpdateGlowEffect(void);
|
||||
void DestroyGlowEffect(void);
|
||||
#endif
|
||||
|
||||
public:
|
||||
CNetworkVar( int, m_nForceBone );
|
||||
CNetworkVector( m_vecForce );
|
||||
|
@ -356,6 +370,11 @@ public:
|
|||
// was pev->framerate
|
||||
CNetworkVar( float, m_flPlaybackRate );
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
protected:
|
||||
CNetworkVar( bool, m_bGlowEnabled );
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
public:
|
||||
void InitStepHeightAdjust( void );
|
||||
void SetIKGroundContactInfo( float minHeight, float maxHeight );
|
||||
|
|
|
@ -190,9 +190,6 @@ END_SEND_TABLE();
|
|||
// This table encodes the CBaseCombatCharacter
|
||||
//-----------------------------------------------------------------------------
|
||||
IMPLEMENT_SERVERCLASS_ST(CBaseCombatCharacter, DT_BaseCombatCharacter)
|
||||
#ifdef GLOWS_ENABLE
|
||||
SendPropBool( SENDINFO( m_bGlowEnabled ) ),
|
||||
#endif // GLOWS_ENABLE
|
||||
// Data that only gets sent to the local player.
|
||||
SendPropDataTable( "bcc_localdata", 0, &REFERENCE_SEND_TABLE(DT_BCCLocalPlayerExclusive), SendProxy_SendBaseCombatCharacterLocalDataTable ),
|
||||
|
||||
|
@ -743,10 +740,6 @@ CBaseCombatCharacter::CBaseCombatCharacter( void )
|
|||
m_impactEnergyScale = 1.0f;
|
||||
|
||||
m_bForceServerRagdoll = ai_force_serverside_ragdoll.GetBool();
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
m_bGlowEnabled.Set( false );
|
||||
#endif // GLOWS_ENABLE
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
@ -851,10 +844,6 @@ void CBaseCombatCharacter::UpdateOnRemove( void )
|
|||
SetOwnerEntity( NULL );
|
||||
}
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
RemoveGlowEffect();
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
// Chain at end to mimic destructor unwind order
|
||||
BaseClass::UpdateOnRemove();
|
||||
}
|
||||
|
@ -3230,33 +3219,6 @@ float CBaseCombatCharacter::GetSpreadBias( CBaseCombatWeapon *pWeapon, CBaseEnti
|
|||
return 1.0;
|
||||
}
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CBaseCombatCharacter::AddGlowEffect( void )
|
||||
{
|
||||
SetTransmitState( FL_EDICT_ALWAYS );
|
||||
m_bGlowEnabled.Set( true );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CBaseCombatCharacter::RemoveGlowEffect( void )
|
||||
{
|
||||
m_bGlowEnabled.Set( false );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CBaseCombatCharacter::IsGlowEffectActive( void )
|
||||
{
|
||||
return m_bGlowEnabled;
|
||||
}
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Assume everyone is average with every weapon. Override this to make exceptions.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -412,13 +412,6 @@ public:
|
|||
// -----------------------
|
||||
virtual void OnPursuedBy( INextBot * RESTRICT pPursuer ){} // called every frame while pursued by a bot in DirectChase.
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
// Glows
|
||||
void AddGlowEffect( void );
|
||||
void RemoveGlowEffect( void );
|
||||
bool IsGlowEffectActive( void );
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
#ifdef INVASION_DLL
|
||||
public:
|
||||
|
||||
|
@ -456,17 +449,9 @@ protected:
|
|||
public:
|
||||
CNetworkVar( float, m_flNextAttack ); // cannot attack again until this time
|
||||
|
||||
#ifdef GLOWS_ENABLE
|
||||
protected:
|
||||
CNetworkVar( bool, m_bGlowEnabled );
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
private:
|
||||
Hull_t m_eHull;
|
||||
|
||||
void UpdateGlowEffect( void );
|
||||
void DestroyGlowEffect( void );
|
||||
|
||||
protected:
|
||||
int m_bloodColor; // color of blood particless
|
||||
|
||||
|
|
|
@ -1836,8 +1836,6 @@ BEGIN_DATADESC( CDynamicProp )
|
|||
DEFINE_INPUTFUNC( FIELD_VOID, "EnableCollision", InputEnableCollision ),
|
||||
DEFINE_INPUTFUNC( FIELD_VOID, "DisableCollision", InputDisableCollision ),
|
||||
DEFINE_INPUTFUNC( FIELD_FLOAT, "SetPlaybackRate", InputSetPlaybackRate ),
|
||||
DEFINE_INPUTFUNC( FIELD_VOID, "EnableGlow", InputEnableGlow),
|
||||
DEFINE_INPUTFUNC(FIELD_VOID, "DisableGlow", InputDisableGlow),
|
||||
|
||||
// Outputs
|
||||
DEFINE_OUTPUT( m_pOutputAnimBegun, "OnAnimationBegun" ),
|
||||
|
@ -1851,10 +1849,6 @@ BEGIN_DATADESC( CDynamicProp )
|
|||
END_DATADESC()
|
||||
|
||||
IMPLEMENT_SERVERCLASS_ST(CDynamicProp, DT_DynamicProp)
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
SendPropBool(SENDINFO(m_bGlowEnabled)),
|
||||
#endif // GLOWS_ENABLE
|
||||
SendPropBool( SENDINFO( m_bUseHitboxesForRenderBox ) ),
|
||||
END_SEND_TABLE()
|
||||
|
||||
|
@ -1869,10 +1863,6 @@ CDynamicProp::CDynamicProp()
|
|||
UseClientSideAnimation();
|
||||
}
|
||||
m_iGoalSequence = -1;
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
m_bGlowEnabled.Set(false);
|
||||
#endif // GLOWS_ENABLE
|
||||
}
|
||||
|
||||
|
||||
|
@ -2118,49 +2108,9 @@ IPhysicsObject *CDynamicProp::GetRootPhysicsObjectForBreak()
|
|||
//-----------------------------------------------------------------------------
|
||||
void CDynamicProp::UpdateOnRemove( void )
|
||||
{
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
RemoveGlowEffect();
|
||||
#endif // GLOWS_ENABLE
|
||||
m_BoneFollowerManager.DestroyBoneFollowers();
|
||||
BaseClass::UpdateOnRemove();
|
||||
}
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
void CDynamicProp::Event_Killed(const CTakeDamageInfo &info)
|
||||
{
|
||||
RemoveGlowEffect();
|
||||
BaseClass::Event_Killed(info);
|
||||
}
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CDynamicProp::AddGlowEffect(void)
|
||||
{
|
||||
SetTransmitState(FL_EDICT_ALWAYS);
|
||||
m_bGlowEnabled.Set(true);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CDynamicProp::RemoveGlowEffect(void)
|
||||
{
|
||||
m_bGlowEnabled.Set(false);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CDynamicProp::IsGlowEffectActive(void)
|
||||
{
|
||||
return m_bGlowEnabled;
|
||||
}
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -2355,16 +2305,11 @@ void CDynamicProp::PropSetSequence( int nSequence )
|
|||
void CDynamicProp::InputTurnOn( inputdata_t &inputdata )
|
||||
{
|
||||
RemoveEffects( EF_NODRAW );
|
||||
|
||||
}
|
||||
|
||||
void CDynamicProp::InputTurnOff( inputdata_t &inputdata )
|
||||
{
|
||||
AddEffects( EF_NODRAW );
|
||||
//SDK2013CE PropDynamicGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
RemoveGlowEffect();
|
||||
#endif // GLOWS_ENABLE
|
||||
}
|
||||
|
||||
void CDynamicProp::InputDisableCollision( inputdata_t &inputdata )
|
||||
|
@ -2377,17 +2322,6 @@ void CDynamicProp::InputEnableCollision( inputdata_t &inputdata )
|
|||
RemoveSolidFlags( FSOLID_NOT_SOLID );
|
||||
}
|
||||
|
||||
//SDK2013CE PropDynamicGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
void CDynamicProp::InputEnableGlow(inputdata_t &inputdata)
|
||||
{
|
||||
AddGlowEffect();
|
||||
}
|
||||
void CDynamicProp::InputDisableGlow(inputdata_t &inputdata)
|
||||
{
|
||||
RemoveGlowEffect();
|
||||
}
|
||||
#endif // GLOWS_ENABLE
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Ornamental prop that follows a studio
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -286,13 +286,6 @@ public:
|
|||
// IPositionWatcher
|
||||
virtual void NotifyPositionChanged( CBaseEntity *pEntity );
|
||||
|
||||
//Prop Killed
|
||||
//SDK2013CE DynamicPropGlow
|
||||
//Added so we can stop glow on kill
|
||||
#ifdef GLOWS_ENABLE
|
||||
virtual void Event_Killed(const CTakeDamageInfo &info);
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
// Input handlers
|
||||
void InputSetAnimation( inputdata_t &inputdata );
|
||||
void InputSetDefaultAnimation( inputdata_t &inputdata );
|
||||
|
@ -301,11 +294,7 @@ public:
|
|||
void InputDisableCollision( inputdata_t &inputdata );
|
||||
void InputEnableCollision( inputdata_t &inputdata );
|
||||
void InputSetPlaybackRate( inputdata_t &inputdata );
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
void InputEnableGlow(inputdata_t &inputdata);
|
||||
void InputDisableGlow(inputdata_t &inputdata);
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
COutputEvent m_pOutputAnimBegun;
|
||||
COutputEvent m_pOutputAnimOver;
|
||||
|
||||
|
@ -325,22 +314,12 @@ public:
|
|||
bool m_bDisableBoneFollowers;
|
||||
|
||||
CNetworkVar( bool, m_bUseHitboxesForRenderBox );
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
// Glows
|
||||
void AddGlowEffect(void);
|
||||
void RemoveGlowEffect(void);
|
||||
bool IsGlowEffectActive(void);
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
protected:
|
||||
void FinishSetSequence( int nSequence );
|
||||
void PropSetAnim( const char *szAnim );
|
||||
void BoneFollowerHierarchyChanged();
|
||||
//SDK2013CE DynamicPropGlow
|
||||
#ifdef GLOWS_ENABLE
|
||||
protected:
|
||||
CNetworkVar(bool, m_bGlowEnabled);
|
||||
#endif // GLOWS_ENABLE
|
||||
|
||||
// Contained Bone Follower manager
|
||||
CBoneFollowerManager m_BoneFollowerManager;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue