1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 12:06:07 +08:00

Sync with upstream (Issue #30).

Recompiled tier1 and mathlib  for all platforms will come in next commit.
This commit is contained in:
Nicholas Hastings
2016-11-30 10:01:15 -05:00
parent 98fe5b5a34
commit 3957adff10
491 changed files with 29846 additions and 10698 deletions

View File

@ -68,6 +68,15 @@ const char *CClientSideEffect::GetName( void )
return m_pszName;
}
//-----------------------------------------------------------------------------
// Purpose: Set the name of effect
// Input : const char
//-----------------------------------------------------------------------------
void CClientSideEffect::SetEffectName( const char *pszName )
{
m_pszName = pszName;
}
//-----------------------------------------------------------------------------
// Purpose: Is effect still active?
// Output : Returns true on success, false on failure.
@ -99,6 +108,7 @@ public:
// Add an effect to the effects list
void AddEffect( CClientSideEffect *effect );
// Remove the specified effect
void RemoveEffect( CClientSideEffect *effect );
// Draw/update all effects in the current list
void DrawEffects( double frametime );
// Flush out all effects from the list
@ -160,6 +170,23 @@ void CEffectsList::AddEffect( CClientSideEffect *effect )
m_rgEffects[ m_nEffects++ ] = effect;
}
//-----------------------------------------------------------------------------
void CEffectsList::RemoveEffect( CClientSideEffect *effect )
{
Assert( effect );
CClientSideEffect **end = &m_rgEffects[m_nEffects];
for( CClientSideEffect **p = &m_rgEffects[0]; p < end; ++p)
{
if ( *p == effect )
{
RemoveEffect( p - &m_rgEffects[0] ); // todo remove this crutch
return;
}
}
Assert( false ); // don't know this effect
}
//-----------------------------------------------------------------------------
// Purpose: Remove specified effect by index
// Input : effectIndex -