mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-14 20:56:56 +00:00
add source-sdk-2013
This commit is contained in:
@@ -365,7 +365,7 @@ void CParticleProperty::StopParticlesInvolving( CBaseEntity *pEntity )
|
||||
// Purpose: Stop all effects that were created using the given definition
|
||||
// name.
|
||||
//-----------------------------------------------------------------------------
|
||||
void CParticleProperty::StopParticlesNamed( const char *pszEffectName, bool bForceRemoveInstantly /* =false */, bool bInverse /*= false*/ )
|
||||
void CParticleProperty::StopParticlesNamed( const char *pszEffectName, bool bForceRemoveInstantly /* =false */ )
|
||||
{
|
||||
CParticleSystemDefinition *pDef = g_pParticleSystemMgr->FindParticleSystem( pszEffectName );
|
||||
AssertMsg1(pDef, "Could not find particle definition %s", pszEffectName );
|
||||
@@ -384,15 +384,13 @@ void CParticleProperty::StopParticlesNamed( const char *pszEffectName, bool bFor
|
||||
{
|
||||
// for each effect...
|
||||
CNewParticleEffect *pParticleEffect = m_ParticleEffects[i].pParticleEffect.GetObject();
|
||||
bool bMatches = pParticleEffect->m_pDef() == pDef;
|
||||
if ( bMatches == !bInverse )
|
||||
if (pParticleEffect->m_pDef() == pDef)
|
||||
{
|
||||
pParticleEffect->StopEmission( false, bRemoveInstantly );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CParticleProperty::StopParticlesWithNameAndAttachment( const char *pszEffectName, int iAttachmentPoint, bool bForceRemoveInstantly /* =false */ )
|
||||
{
|
||||
CParticleSystemDefinition *pDef = g_pParticleSystemMgr->FindParticleSystem( pszEffectName );
|
||||
@@ -564,7 +562,7 @@ void CParticleProperty::UpdateControlPoint( ParticleEffectList_t *pEffect, int i
|
||||
#ifdef TF_CLIENT_DLL
|
||||
|
||||
CBaseEntity *pWearable = (CBaseEntity*) pPoint->hEntity.Get();
|
||||
if ( pWearable && GetAttribInterface( pWearable ) && !pWearable->IsPlayer() )
|
||||
if ( pWearable && dynamic_cast<IHasAttributes*>( pWearable ) && !pWearable->IsPlayer() )
|
||||
{
|
||||
C_BaseAnimating *pAnimating = pPoint->hEntity->GetBaseAnimating();
|
||||
if ( pAnimating )
|
||||
@@ -618,9 +616,7 @@ void CParticleProperty::UpdateControlPoint( ParticleEffectList_t *pEffect, int i
|
||||
if ( !pAnimating->C_BaseAnimating::GetAttachment( pPoint->iAttachmentPoint, attachmentToWorld ) )
|
||||
{
|
||||
Warning( "Cannot update control point %d for effect '%s'.\n", pPoint->iAttachmentPoint, pEffect->pParticleEffect->GetEffectName() );
|
||||
// Remove the effect cause this warning means something is orphaned
|
||||
StopParticlesNamed( pEffect->pParticleEffect->GetEffectName() );
|
||||
return;
|
||||
attachmentToWorld = pAnimating->RenderableToWorldTransform();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -629,7 +625,7 @@ void CParticleProperty::UpdateControlPoint( ParticleEffectList_t *pEffect, int i
|
||||
MatrixVectors( vMat.As3x4(), &vecForward, &vecRight, &vecUp );
|
||||
MatrixPosition( vMat.As3x4(), vecOrigin );
|
||||
|
||||
if ( pEffect->pParticleEffect->GetIsViewModelEffect() )
|
||||
if ( pEffect->pParticleEffect->m_pDef->IsViewModelEffect() )
|
||||
{
|
||||
FormatViewModelAttachment( vecOrigin, true );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user