summaryrefslogtreecommitdiff
path: root/game/client/tfc/fx_tfc_impacts.cpp
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/tfc/fx_tfc_impacts.cpp
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/tfc/fx_tfc_impacts.cpp')
-rw-r--r--game/client/tfc/fx_tfc_impacts.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/game/client/tfc/fx_tfc_impacts.cpp b/game/client/tfc/fx_tfc_impacts.cpp
new file mode 100644
index 0000000..915f4dd
--- /dev/null
+++ b/game/client/tfc/fx_tfc_impacts.cpp
@@ -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 );