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.

67 lines
1.7 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CAMERA_H
  8. #define CAMERA_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "cbase.h"
  13. //-----------------------------------------------------------------------------
  14. // Purpose:
  15. //-----------------------------------------------------------------------------
  16. class CPointCamera : public CBaseEntity
  17. {
  18. public:
  19. DECLARE_CLASS( CPointCamera, CBaseEntity );
  20. DECLARE_SERVERCLASS();
  21. DECLARE_DATADESC();
  22. CPointCamera();
  23. ~CPointCamera();
  24. void Spawn( void );
  25. // Tell the client that this camera needs to be rendered
  26. void SetActive( bool bActive );
  27. bool IsActive( void ) { return m_bActive; }
  28. int UpdateTransmitState(void);
  29. void ChangeFOVThink( void );
  30. float GetFOV() { return m_FOV; }
  31. void InputChangeFOV( inputdata_t &inputdata );
  32. void InputSetOnAndTurnOthersOff( inputdata_t &inputdata );
  33. void InputSetOn( inputdata_t &inputdata );
  34. void InputSetOff( inputdata_t &inputdata );
  35. void InputForceActive( inputdata_t &inputdata );
  36. void InputForceInactive( inputdata_t &inputdata );
  37. private:
  38. float m_TargetFOV;
  39. float m_DegreesPerSecond;
  40. CNetworkVar( float, m_FOV );
  41. CNetworkVar( float, m_Resolution );
  42. CNetworkVar( bool, m_bFogEnable );
  43. CNetworkColor32( m_FogColor );
  44. CNetworkVar( float, m_flFogStart );
  45. CNetworkVar( float, m_flFogEnd );
  46. CNetworkVar( float, m_flFogMaxDensity );
  47. CNetworkVar( bool, m_bActive );
  48. CNetworkVar( bool, m_bUseScreenAspectRatio );
  49. // Allows the mapmaker to control whether a camera is active or not
  50. bool m_bIsOn;
  51. public:
  52. CPointCamera *m_pNext;
  53. };
  54. CPointCamera *GetPointCameraList();
  55. #endif // CAMERA_H