Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
805 B

//========= 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 );