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.

82 lines
3.0 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Client-server neutral effects interface
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef IEFFECTS_H
  8. #define IEFFECTS_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "basetypes.h"
  13. #include "mathlib/vector.h"
  14. #include "interface.h"
  15. #include "ipredictionsystem.h"
  16. //-----------------------------------------------------------------------------
  17. // Forward declarations
  18. //-----------------------------------------------------------------------------
  19. enum ShakeCommand_t;
  20. class Vector;
  21. class CGameTrace;
  22. typedef CGameTrace trace_t;
  23. //-----------------------------------------------------------------------------
  24. // Client-server neutral effects interface
  25. //-----------------------------------------------------------------------------
  26. #define IEFFECTS_INTERFACE_VERSION "IEffects001"
  27. abstract_class IEffects : public IPredictionSystem
  28. {
  29. public:
  30. //
  31. // Particle effects
  32. //
  33. virtual void Beam( const Vector &Start, const Vector &End, int nModelIndex,
  34. int nHaloIndex, unsigned char frameStart, unsigned char frameRate,
  35. float flLife, unsigned char width, unsigned char endWidth, unsigned char fadeLength,
  36. unsigned char noise, unsigned char red, unsigned char green,
  37. unsigned char blue, unsigned char brightness, unsigned char speed) = 0;
  38. //-----------------------------------------------------------------------------
  39. // Purpose: Emits smoke sprites.
  40. // Input : origin - Where to emit the sprites.
  41. // scale - Sprite scale * 10.
  42. // framerate - Framerate at which to animate the smoke sprites.
  43. //-----------------------------------------------------------------------------
  44. virtual void Smoke( const Vector &origin, int modelIndex, float scale, float framerate ) = 0;
  45. virtual void Sparks( const Vector &position, int nMagnitude = 1, int nTrailLength = 1, const Vector *pvecDir = NULL ) = 0;
  46. virtual void Dust( const Vector &pos, const Vector &dir, float size, float speed ) = 0;
  47. virtual void MuzzleFlash( const Vector &vecOrigin, const QAngle &vecAngles, float flScale, int iType ) = 0;
  48. // like ricochet, but no sound
  49. virtual void MetalSparks( const Vector &position, const Vector &direction ) = 0;
  50. virtual void EnergySplash( const Vector &position, const Vector &direction, bool bExplosive = false ) = 0;
  51. virtual void Ricochet( const Vector &position, const Vector &direction ) = 0;
  52. // FIXME: Should these methods remain in this interface? Or go in some
  53. // other client-server neutral interface?
  54. virtual float Time() = 0;
  55. virtual bool IsServer() = 0;
  56. // Used by the playback system to suppress sounds
  57. virtual void SuppressEffectsSounds( bool bSuppress ) = 0;
  58. };
  59. //-----------------------------------------------------------------------------
  60. // Client-server neutral effects interface accessor
  61. //-----------------------------------------------------------------------------
  62. extern IEffects *g_pEffects;
  63. #endif // IEFFECTS_H