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
1.7 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef FUNC_MOVELINEAR_H
  8. #define FUNC_MOVELINEAR_H
  9. #pragma once
  10. #include "basetoggle.h"
  11. #include "entityoutput.h"
  12. class IPhysicsFluidController;
  13. class CFuncMoveLinear : public CBaseToggle
  14. {
  15. public:
  16. DECLARE_CLASS( CFuncMoveLinear, CBaseToggle );
  17. DECLARE_SERVERCLASS();
  18. IMPLEMENT_NETWORK_VAR_FOR_DERIVED( m_vecVelocity );
  19. IMPLEMENT_NETWORK_VAR_FOR_DERIVED( m_fFlags );
  20. void Spawn( void );
  21. void Precache( void );
  22. bool CreateVPhysics( void );
  23. bool ShouldSavePhysics( void );
  24. void MoveTo(Vector vPosition, float flSpeed);
  25. void Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
  26. void MoveDone( void );
  27. void StopMoveSound( void );
  28. void Blocked( CBaseEntity *pOther );
  29. void SetPosition( float flPosition );
  30. int DrawDebugTextOverlays(void);
  31. // Input handlers
  32. void InputOpen( inputdata_t &inputdata );
  33. void InputClose( inputdata_t &inputdata );
  34. void InputSetPosition( inputdata_t &inputdata );
  35. void InputSetSpeed( inputdata_t &inputdata );
  36. DECLARE_DATADESC();
  37. Vector m_vecMoveDir; // Move direction.
  38. string_t m_soundStart; // start and looping sound
  39. string_t m_soundStop; // stop sound
  40. string_t m_currentSound; // sound I'm playing
  41. float m_flBlockDamage; // Damage inflicted when blocked.
  42. float m_flStartPosition; // Position of brush when spawned
  43. float m_flMoveDistance; // Total distance the brush can move
  44. IPhysicsFluidController *m_pFluidController;
  45. // Outputs
  46. COutputEvent m_OnFullyOpen;
  47. COutputEvent m_OnFullyClosed;
  48. };
  49. #endif // FUNC_MOVELINEAR_H