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.

143 lines
3.3 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef PLAYERNET_VARS_H
  8. #define PLAYERNET_VARS_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "shared_classnames.h"
  13. #define NUM_AUDIO_LOCAL_SOUNDS 8
  14. // These structs are contained in each player's local data and shared by the client & server
  15. struct fogparams_t
  16. {
  17. DECLARE_CLASS_NOBASE( fogparams_t );
  18. DECLARE_EMBEDDED_NETWORKVAR();
  19. #ifndef CLIENT_DLL
  20. DECLARE_SIMPLE_DATADESC();
  21. #endif
  22. bool operator !=( const fogparams_t& other ) const;
  23. CNetworkVector( dirPrimary );
  24. CNetworkColor32( colorPrimary );
  25. CNetworkColor32( colorSecondary );
  26. CNetworkColor32( colorPrimaryLerpTo );
  27. CNetworkColor32( colorSecondaryLerpTo );
  28. CNetworkVar( float, start );
  29. CNetworkVar( float, end );
  30. CNetworkVar( float, farz );
  31. CNetworkVar( float, maxdensity );
  32. CNetworkVar( float, startLerpTo );
  33. CNetworkVar( float, endLerpTo );
  34. CNetworkVar( float, maxdensityLerpTo );
  35. CNetworkVar( float, lerptime );
  36. CNetworkVar( float, duration );
  37. CNetworkVar( bool, enable );
  38. CNetworkVar( bool, blend );
  39. CNetworkVar( float, ZoomFogScale );
  40. CNetworkVar( float, HDRColorScale );
  41. };
  42. // Crappy. Needs to be here because it wants to use
  43. #ifdef CLIENT_DLL
  44. #define CFogController C_FogController
  45. #endif
  46. class CFogController;
  47. struct fogplayerparams_t
  48. {
  49. DECLARE_CLASS_NOBASE( fogplayerparams_t );
  50. DECLARE_EMBEDDED_NETWORKVAR();
  51. #ifndef CLIENT_DLL
  52. DECLARE_SIMPLE_DATADESC();
  53. #endif
  54. CNetworkHandle( CFogController, m_hCtrl );
  55. float m_flTransitionTime;
  56. color32 m_OldColor;
  57. float m_flOldStart;
  58. float m_flOldEnd;
  59. float m_flOldMaxDensity;
  60. float m_flOldHDRColorScale;
  61. float m_flOldFarZ;
  62. color32 m_NewColor;
  63. float m_flNewStart;
  64. float m_flNewEnd;
  65. float m_flNewMaxDensity;
  66. float m_flNewHDRColorScale;
  67. float m_flNewFarZ;
  68. float m_flZoomFogScale;
  69. fogplayerparams_t()
  70. {
  71. m_hCtrl.Set( NULL );
  72. m_flTransitionTime = -1.0f;
  73. m_OldColor.r = m_OldColor.g = m_OldColor.g = m_OldColor.a = 0.0f;
  74. m_flOldStart = 0.0f;
  75. m_flOldEnd = 0.0f;
  76. m_flOldMaxDensity = 1.0f;
  77. m_flOldHDRColorScale = 1.0f;
  78. m_flOldFarZ = 0;
  79. m_NewColor.r = m_NewColor.g = m_NewColor.g = m_NewColor.a = 0.0f;
  80. m_flNewStart = 0.0f;
  81. m_flNewEnd = 0.0f;
  82. m_flNewMaxDensity = 1.0f;
  83. m_flNewHDRColorScale = 1.0f;
  84. m_flNewFarZ = 0;
  85. m_flZoomFogScale = 1.0f;
  86. }
  87. };
  88. struct sky3dparams_t
  89. {
  90. DECLARE_CLASS_NOBASE( sky3dparams_t );
  91. DECLARE_EMBEDDED_NETWORKVAR();
  92. #ifndef CLIENT_DLL
  93. DECLARE_SIMPLE_DATADESC();
  94. #endif
  95. // 3d skybox camera data
  96. CNetworkVar( int, scale );
  97. CNetworkVector( origin );
  98. CNetworkVar( int, area );
  99. // 3d skybox fog data
  100. CNetworkVarEmbedded( fogparams_t, fog );
  101. };
  102. struct audioparams_t
  103. {
  104. DECLARE_CLASS_NOBASE( audioparams_t );
  105. DECLARE_EMBEDDED_NETWORKVAR();
  106. #ifndef CLIENT_DLL
  107. DECLARE_SIMPLE_DATADESC();
  108. #endif
  109. CNetworkArray( Vector, localSound, NUM_AUDIO_LOCAL_SOUNDS )
  110. CNetworkVar( int, soundscapeIndex ); // index of the current soundscape from soundscape.txt
  111. CNetworkVar( int, localBits ); // if bits 0,1,2,3 are set then position 0,1,2,3 are valid/used
  112. CNetworkVar( int, entIndex ); // the entity setting the soundscape
  113. };
  114. #endif // PLAYERNET_VARS_H