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 MODELENTITIES_H
  8. #define MODELENTITIES_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. //!! replace this with generic start enabled/disabled
  13. #define SF_WALL_START_OFF 0x0001
  14. #define SF_IGNORE_PLAYERUSE 0x0002
  15. //-----------------------------------------------------------------------------
  16. // Purpose: basic solid geometry
  17. // enabled state: brush is visible
  18. // disabled state: brush not visible
  19. //-----------------------------------------------------------------------------
  20. class CFuncBrush : public CBaseEntity
  21. {
  22. public:
  23. DECLARE_CLASS( CFuncBrush, CBaseEntity );
  24. virtual void Spawn( void );
  25. bool CreateVPhysics( void );
  26. virtual int ObjectCaps( void ) { return HasSpawnFlags(SF_IGNORE_PLAYERUSE) ? BaseClass::ObjectCaps() : BaseClass::ObjectCaps() | FCAP_IMPULSE_USE; }
  27. virtual int DrawDebugTextOverlays( void );
  28. virtual void TurnOff( void );
  29. virtual void TurnOn( void );
  30. // Input handlers
  31. void InputTurnOff( inputdata_t &inputdata );
  32. void InputTurnOn( inputdata_t &inputdata );
  33. void InputToggle( inputdata_t &inputdata );
  34. void InputSetExcluded( inputdata_t &inputdata );
  35. void InputSetInvert( inputdata_t &inputdata );
  36. enum BrushSolidities_e {
  37. BRUSHSOLID_TOGGLE = 0,
  38. BRUSHSOLID_NEVER = 1,
  39. BRUSHSOLID_ALWAYS = 2,
  40. };
  41. BrushSolidities_e m_iSolidity;
  42. int m_iDisabled;
  43. bool m_bSolidBsp;
  44. string_t m_iszExcludedClass;
  45. bool m_bInvertExclusion;
  46. DECLARE_DATADESC();
  47. virtual bool IsOn( void ) const;
  48. };
  49. #endif // MODELENTITIES_H