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.5 KiB

  1. //========= Copyright 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. int UpdateTransmitState(void);
  28. void ChangeFOVThink( void );
  29. void InputChangeFOV( inputdata_t &inputdata );
  30. void InputSetOnAndTurnOthersOff( inputdata_t &inputdata );
  31. void InputSetOn( inputdata_t &inputdata );
  32. void InputSetOff( inputdata_t &inputdata );
  33. private:
  34. float m_TargetFOV;
  35. float m_DegreesPerSecond;
  36. CNetworkVar( float, m_FOV );
  37. CNetworkVar( float, m_Resolution );
  38. CNetworkVar( bool, m_bFogEnable );
  39. CNetworkColor32( m_FogColor );
  40. CNetworkVar( float, m_flFogStart );
  41. CNetworkVar( float, m_flFogEnd );
  42. CNetworkVar( float, m_flFogMaxDensity );
  43. CNetworkVar( bool, m_bActive );
  44. CNetworkVar( bool, m_bUseScreenAspectRatio );
  45. // Allows the mapmaker to control whether a camera is active or not
  46. bool m_bIsOn;
  47. public:
  48. CPointCamera *m_pNext;
  49. };
  50. CPointCamera *GetPointCameraList();
  51. #endif // CAMERA_H