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.

38 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Define inline functions for the CParticleProperty class. The
  4. // definitions exist in this include file to avoid cluttering up
  5. // particle_property.h, but this file should not be included from any-
  6. // where else.
  7. //
  8. //=============================================================================
  9. #ifndef PARTICLEPROPERTY_H
  10. #pragma message("Do not include particle_property_inlines.h from anywhere other than particle_property.h!")
  11. #pragma error
  12. #endif
  13. #ifndef PARTICLEPROPERTY_INLINES_H
  14. #define PARTICLEPROPERTY_INLINES_H
  15. #ifdef _WIN32
  16. #pragma once
  17. #endif
  18. /// Set the parent of a given control point on a given effect to the index of another control point. This is
  19. /// in fact entirely redundant given the function is actually on the CNewParticleEffect, but is included here
  20. /// for uniformity of interface.
  21. void CParticleProperty::SetControlPointParent( CNewParticleEffect *pEffect, int whichControlPoint, int parentIdx )
  22. {
  23. pEffect->SetControlPointParent(whichControlPoint, parentIdx);
  24. }
  25. /// Given an index, return a pointer to the relevant particle effect structure. For convenience.
  26. CNewParticleEffect *CParticleProperty::GetParticleEffectFromIdx( int idx )
  27. {
  28. return m_ParticleEffects[idx].pParticleEffect.GetObject();
  29. }
  30. #endif // #ifndef PARTICLEPROPERTY_INLINES_H