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.

65 lines
1.7 KiB

  1. //===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose: Spatial entity.
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #ifndef SPATIALENTITY_H
  8. #define SPATIALENTITY_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. //------------------------------------------------------------------------------
  13. // Purpose : Spatial entity
  14. //------------------------------------------------------------------------------
  15. class CSpatialEntity : public CBaseEntity
  16. {
  17. DECLARE_CLASS( CSpatialEntity, CBaseEntity );
  18. public:
  19. DECLARE_SERVERCLASS();
  20. DECLARE_DATADESC();
  21. CSpatialEntity();
  22. void Spawn( void );
  23. int UpdateTransmitState();
  24. virtual int ObjectCaps( void ) { return BaseClass::ObjectCaps() & ~FCAP_ACROSS_TRANSITION; }
  25. // Inputs
  26. void InputEnable( inputdata_t &inputdata );
  27. void InputDisable( inputdata_t &inputdata );
  28. void InputSetFadeInDuration ( inputdata_t &inputdata );
  29. void InputSetFadeOutDuration ( inputdata_t &inputdata );
  30. private:
  31. void FadeIn ( void );
  32. void FadeOut ( void );
  33. void FadeInThink( void ); // Fades lookup weight from Cur->MaxWeight
  34. void FadeOutThink( void ); // Fades lookup weight from CurWeight->0.0
  35. float m_flFadeInDuration; // Duration for a full 0->MaxWeight transition
  36. float m_flFadeOutDuration; // Duration for a full Max->0 transition
  37. float m_flStartFadeInWeight;
  38. float m_flStartFadeOutWeight;
  39. float m_flTimeStartFadeIn;
  40. float m_flTimeStartFadeOut;
  41. float m_flMaxWeight;
  42. bool m_bStartDisabled;
  43. CNetworkVar( bool, m_bEnabled );
  44. CNetworkVar( float, m_MinFalloff );
  45. CNetworkVar( float, m_MaxFalloff );
  46. CNetworkVar( float, m_flCurWeight );
  47. string_t m_lookupFilename;
  48. };
  49. #endif // SPATIALENTITY_H