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.

60 lines
1.7 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: A CBaseFlex, with an Expresser so that it can
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef FLEX_EXPRESSER_H
  8. #define FLEX_EXPRESSER_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "flexcycler.h"
  13. #include "ai_speech.h"
  14. #define FCYCLER_NOTSOLID 1
  15. class CFlexExpresserShim : public CFlexCycler
  16. {
  17. public:
  18. inline CAI_Expresser *GetExpresser( void ) { return m_pExpresser; }
  19. inline const CAI_Expresser *GetMultiplayerExpresser( void ) const { return m_pExpresser; }
  20. protected:
  21. CAI_Expresser *m_pExpresser;
  22. };
  23. class CFlexExpresser : public CAI_ExpresserHost<CFlexExpresserShim>
  24. {
  25. DECLARE_CLASS( CFlexExpresser, CAI_ExpresserHost<CFlexExpresserShim> );
  26. public:
  27. DECLARE_DATADESC();
  28. CFlexExpresser();
  29. ~CFlexExpresser();
  30. inline CAI_Expresser *GetExpresser( void ) { return m_pExpresser; }
  31. inline const CAI_Expresser *GetMultiplayerExpresser( void ) const { return m_pExpresser; }
  32. virtual IResponseSystem *GetResponseSystem( void );
  33. virtual void Spawn();
  34. void Think( void );
  35. virtual int OnTakeDamage( const CTakeDamageInfo &info ); //< stubbed out, does nothing, flexexpressers are immortal
  36. void InputSpeakResponseConcept( inputdata_t &inputdata );
  37. /// given a pointer to a CBaseEntity, return a CFlexExpresser * if that base entity is a prop_talker, NULL otherwise
  38. /// (hopefully faster than dynamic_cast). Passing NULL is safe.
  39. static CFlexExpresser *AsFlexExpresser( CBaseEntity *pEntity );
  40. float m_flThenAnyMaxDist; //< if nonzero, override the maximum dispatch distance for a THEN ANY followup.
  41. protected:
  42. CAI_Expresser *CreateExpresser( void );
  43. };
  44. #endif // FLEX_EXPRESSER_H