mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-10 02:39:35 +00:00
1
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
#include "cbase.h"
|
||||
#include "fx_impact.h"
|
||||
|
||||
|
||||
void TFCImpact( const CEffectData &data )
|
||||
{
|
||||
Vector vOrigin, vStart, vDir;
|
||||
short nSurfaceProp;
|
||||
int iMaterial, iDamageType, iHitbox;
|
||||
C_BaseEntity *pEntity = ParseImpactData( data, &vOrigin, &vStart, &vDir, nSurfaceProp, iMaterial, iDamageType, iHitbox );
|
||||
|
||||
trace_t tr;
|
||||
if ( Impact( vOrigin, vStart, iMaterial, iDamageType, iHitbox, iEntIndex, tr ) )
|
||||
{
|
||||
// Check for custom effects based on the Decal index
|
||||
PerformCustomEffects( vOrigin, tr, vDir, iMaterial, 1.0 );
|
||||
}
|
||||
|
||||
PlayImpactSound( pEntity, tr, vOrigin, nSurfaceProp );
|
||||
}
|
||||
|
||||
|
||||
DECLARE_CLIENT_EFFECT( "Impact", TFCImpact );
|
||||
Reference in New Issue
Block a user