Counter Strike : Global Offensive Source Code
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.

67 lines
4.2 KiB

  1. //====== Copyright � 1996-2005, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef PARTICLE_PARSE_H
  7. #define PARTICLE_PARSE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "utlvector.h"
  12. #include "utlstring.h"
  13. //-----------------------------------------------------------------------------
  14. // Particle attachment methods
  15. //-----------------------------------------------------------------------------
  16. enum ParticleAttachment_t
  17. {
  18. PATTACH_ABSORIGIN = 0, // Create at absorigin, but don't follow
  19. PATTACH_ABSORIGIN_FOLLOW, // Create at absorigin, and update to follow the entity
  20. PATTACH_CUSTOMORIGIN, // Create at a custom origin, but don't follow
  21. PATTACH_CUSTOMORIGIN_FOLLOW, // Create at a custom origin, follow relative position to specified entity
  22. PATTACH_POINT, // Create on attachment point, but don't follow
  23. PATTACH_POINT_FOLLOW, // Create on attachment point, and update to follow the entity
  24. PATTACH_EYES_FOLLOW, // Create on eyes of the attached entity, and update to follow the entity
  25. PATTACH_OVERHEAD_FOLLOW, // Create at the top of the entity's bbox
  26. PATTACH_WORLDORIGIN, // Used for control points that don't attach to an entity
  27. PATTACH_ROOTBONE_FOLLOW, // Create at the root bone of the entity, and update to follow
  28. MAX_PATTACH_TYPES,
  29. };
  30. extern int GetAttachTypeFromString( const char *pszString );
  31. #define PARTICLE_DISPATCH_FROM_ENTITY (1<<0)
  32. #define PARTICLE_DISPATCH_RESET_PARTICLES (1<<1)
  33. #define PARTICLE_DISPATCH_ALLOW_DORMANT (1<<2)
  34. //-----------------------------------------------------------------------------
  35. // Particle parsing methods
  36. //-----------------------------------------------------------------------------
  37. // Parse the particle manifest file & register the effects within it
  38. // Only needs to be called once per game, unless tools change particle definitions
  39. void ParseParticleEffects( bool bLoadSheets );
  40. // Precaches standard particle systems (only necessary on server)
  41. // Should be called once per level
  42. void PrecacheStandardParticleSystems( );
  43. //-----------------------------------------------------------------------------
  44. // Particle spawning methods
  45. //-----------------------------------------------------------------------------
  46. void DispatchParticleEffect( const char *pszParticleName, ParticleAttachment_t iAttachType, CBaseEntity *pEntity, const char *pszAttachmentName, bool bResetAllParticlesOnEntity = false, int nSplitScreenPlayerSlot = -1, IRecipientFilter *filter = NULL );
  47. void DispatchParticleEffect( const char *pszParticleName, ParticleAttachment_t iAttachType, CBaseEntity *pEntity = NULL, int iAttachmentPoint = -1, bool bResetAllParticlesOnEntity = false, int nSplitScreenPlayerSlot = -1, IRecipientFilter *filter = NULL, bool bAllowDormantSpawn = false );
  48. void DispatchParticleEffect( const char *pszParticleName, Vector vecOrigin, QAngle vecAngles, CBaseEntity *pEntity = NULL, int nSplitScreenPlayerSlot = -1, IRecipientFilter *filter = NULL );
  49. void DispatchParticleEffect( const char *pszParticleName, const Vector &vecOrigin, const QAngle &vecAngles, ParticleAttachment_t iAttachType, CBaseEntity *pEntity = NULL, int nSplitScreenPlayerSlot = -1 );
  50. void DispatchParticleEffect( const char *pszParticleName, Vector vecOrigin, Vector vecStart, QAngle vecAngles, CBaseEntity *pEntity = NULL, int nSplitScreenPlayerSlot = -1, IRecipientFilter *filter = NULL );
  51. void DispatchParticleEffect( int iEffectIndex, Vector vecOrigin, Vector vecStart, QAngle vecAngles, CBaseEntity *pEntity = NULL, int nSplitScreenPlayerSlot = -1, IRecipientFilter *filter = NULL );
  52. void DispatchParticleEffectLink( const char *pszParticleName, ParticleAttachment_t iAttachType, CBaseEntity *pEntity = NULL, CBaseEntity *pOtherEntity = NULL, int iAttachmentPoint = -1, bool bResetAllParticlesOnEntity = false, int nSplitScreenPlayerSlot = -1 );
  53. void DispatchParticleEffect( int iEffectIndex, const Vector &vecOrigin, const QAngle &vecAngles, ParticleAttachment_t iAttachType, CBaseEntity *pEntity = NULL, int nSplitScreenPlayerSlot = -1 );
  54. void StopParticleEffects( CBaseEntity *pEntity );
  55. void StopParticleEffect( CBaseEntity *pEntity, const char *pszParticleName );
  56. #endif // PARTICLE_PARSE_H