mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 12:06:07 +08:00
Sync with latest source-sdk-2013.
This commit is contained in:
@ -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 );
|
||||
|
Reference in New Issue
Block a user