summaryrefslogtreecommitdiff
path: root/game/shared/particle_property_inlines.h
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/shared/particle_property_inlines.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/shared/particle_property_inlines.h')
-rw-r--r--game/shared/particle_property_inlines.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/game/shared/particle_property_inlines.h b/game/shared/particle_property_inlines.h
new file mode 100644
index 0000000..a6232e3
--- /dev/null
+++ b/game/shared/particle_property_inlines.h
@@ -0,0 +1,38 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Define inline functions for the CParticleProperty class. The
+// definitions exist in this include file to avoid cluttering up
+// particle_property.h, but this file should not be included from any-
+// where else.
+//
+//=============================================================================
+
+#ifndef PARTICLEPROPERTY_H
+#pragma message("Do not include particle_property_inlines.h from anywhere other than particle_property.h!")
+#pragma error
+#endif
+
+#ifndef PARTICLEPROPERTY_INLINES_H
+#define PARTICLEPROPERTY_INLINES_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+/// Set the parent of a given control point on a given effect to the index of another control point. This is
+/// in fact entirely redundant given the function is actually on the CNewParticleEffect, but is included here
+/// for uniformity of interface.
+void CParticleProperty::SetControlPointParent( CNewParticleEffect *pEffect, int whichControlPoint, int parentIdx )
+{
+ pEffect->SetControlPointParent(whichControlPoint, parentIdx);
+}
+
+/// Given an index, return a pointer to the relevant particle effect structure. For convenience.
+CNewParticleEffect *CParticleProperty::GetParticleEffectFromIdx( int idx )
+{
+ return m_ParticleEffects[idx].pParticleEffect.GetObject();
+}
+
+
+
+#endif // #ifndef PARTICLEPROPERTY_INLINES_H