From 55ed12f8d1eb6887d348be03aee5573d44177ffb Mon Sep 17 00:00:00 2001 From: Michael Sartain Date: Thu, 2 Oct 2014 08:25:55 -0700 Subject: Updated the SDK with the latest code from the TF and HL2 branches. --- mp/src/game/client/c_particle_system.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'mp/src/game/client/c_particle_system.cpp') diff --git a/mp/src/game/client/c_particle_system.cpp b/mp/src/game/client/c_particle_system.cpp index 57f3c375..e0aee808 100644 --- a/mp/src/game/client/c_particle_system.cpp +++ b/mp/src/game/client/c_particle_system.cpp @@ -198,12 +198,19 @@ void ParticleEffectCallback( const CEffectData &data ) pEnt->ParticleProp()->StopEmission(); } - pEffect = pEnt->ParticleProp()->Create( pszName, (ParticleAttachment_t)data.m_nDamageType, data.m_nAttachmentIndex ); + Vector vOffset = vec3_origin; + ParticleAttachment_t iAttachType = (ParticleAttachment_t)data.m_nDamageType; + if ( iAttachType == PATTACH_ABSORIGIN_FOLLOW || iAttachType == PATTACH_POINT_FOLLOW || iAttachType == PATTACH_ROOTBONE_FOLLOW ) + { + vOffset = data.m_vStart; + } + + pEffect = pEnt->ParticleProp()->Create( pszName, iAttachType, data.m_nAttachmentIndex, vOffset ); AssertMsg2( pEffect.IsValid() && pEffect->IsValid(), "%s could not create particle effect %s", C_BaseEntity::Instance( data.m_hEntity )->GetDebugName(), pszName ); if ( pEffect.IsValid() && pEffect->IsValid() ) { - if ( (ParticleAttachment_t)data.m_nDamageType == PATTACH_CUSTOMORIGIN ) + if ( iAttachType == PATTACH_CUSTOMORIGIN ) { pEffect->SetSortOrigin( data.m_vOrigin ); pEffect->SetControlPoint( 0, data.m_vOrigin ); -- cgit v1.2.3