add source-sdk-2013

This commit is contained in:
nillerusr
2022-03-01 23:00:42 +03:00
parent 88b8830e8b
commit edc8d6c584
3288 changed files with 3731 additions and 1062455 deletions
+5 -9
View File
@@ -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 );
}