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.

63 lines
1.6 KiB

  1. //========= Copyright 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. void Spawn( void );
  18. void Precache( void );
  19. bool CreateVPhysics( void );
  20. bool ShouldSavePhysics( void );
  21. void MoveTo(Vector vPosition, float flSpeed);
  22. void Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
  23. void MoveDone( void );
  24. void StopMoveSound( void );
  25. void Blocked( CBaseEntity *pOther );
  26. void SetPosition( float flPosition );
  27. int DrawDebugTextOverlays(void);
  28. // Input handlers
  29. void InputOpen( inputdata_t &inputdata );
  30. void InputClose( inputdata_t &inputdata );
  31. void InputSetPosition( inputdata_t &inputdata );
  32. void InputSetSpeed( inputdata_t &inputdata );
  33. DECLARE_DATADESC();
  34. Vector m_vecMoveDir; // Move direction.
  35. string_t m_soundStart; // start and looping sound
  36. string_t m_soundStop; // stop sound
  37. string_t m_currentSound; // sound I'm playing
  38. float m_flBlockDamage; // Damage inflicted when blocked.
  39. float m_flStartPosition; // Position of brush when spawned
  40. float m_flMoveDistance; // Total distance the brush can move
  41. IPhysicsFluidController *m_pFluidController;
  42. // Outputs
  43. COutputEvent m_OnFullyOpen;
  44. COutputEvent m_OnFullyClosed;
  45. };
  46. #endif // FUNC_MOVELINEAR_H