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.

68 lines
1.7 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef FLEXCYCLER_H
  8. #define FLEXCYCLER_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "baseflex.h"
  13. //-----------------------------------------------------------------------------
  14. // Purpose:
  15. //-----------------------------------------------------------------------------
  16. class CFlexCycler : public CBaseFlex
  17. {
  18. private:
  19. DECLARE_CLASS( CFlexCycler, CBaseFlex );
  20. public:
  21. DECLARE_DATADESC();
  22. CFlexCycler() { m_iszSentence = NULL_STRING; m_sentence = 0; }
  23. void GenericCyclerSpawn(char *szModel, Vector vecMin, Vector vecMax);
  24. virtual int ObjectCaps( void ) { return (BaseClass::ObjectCaps() | FCAP_IMPULSE_USE); }
  25. int OnTakeDamage( const CTakeDamageInfo &info );
  26. void Spawn( void );
  27. void Think( void );
  28. virtual void ProcessSceneEvents( void );
  29. // Don't treat as a live target
  30. virtual bool IsAlive( void ) { return FALSE; }
  31. float m_flextime;
  32. LocalFlexController_t m_flexnum;
  33. float m_flextarget[64];
  34. float m_blinktime;
  35. float m_looktime;
  36. Vector m_lookTarget;
  37. float m_speaktime;
  38. int m_istalking;
  39. int m_phoneme;
  40. string_t m_iszSentence;
  41. int m_sentence;
  42. void SetFlexTarget( LocalFlexController_t flexnum );
  43. LocalFlexController_t LookupFlex( const char *szTarget );
  44. };
  45. //
  46. // we should get rid of all the other cyclers and replace them with this.
  47. //
  48. class CGenericFlexCycler : public CFlexCycler
  49. {
  50. public:
  51. DECLARE_CLASS( CGenericFlexCycler, CFlexCycler );
  52. void Spawn( void ) { GenericCyclerSpawn( (char *)STRING( GetModelName() ), Vector(-16, -16, 0), Vector(16, 16, 72) ); }
  53. };
  54. #endif // FLEXCYCLER_H