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.

75 lines
2.1 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "cbase.h"
  8. #include "gamevars_shared.h"
  9. // memdbgon must be the last include file in a .cpp file!!!
  10. #include "tier0/memdbgon.h"
  11. #ifdef GAME_DLL
  12. void MPForceCameraCallback( IConVar *var, const char *pOldString, float flOldValue )
  13. {
  14. if ( mp_forcecamera.GetInt() < OBS_ALLOW_ALL || mp_forcecamera.GetInt() >= OBS_ALLOW_NUM_MODES )
  15. {
  16. mp_forcecamera.SetValue( OBS_ALLOW_TEAM );
  17. }
  18. }
  19. #endif
  20. // some shared cvars used by game rules
  21. ConVar mp_forcecamera(
  22. "mp_forcecamera",
  23. "1",
  24. FCVAR_REPLICATED | FCVAR_RELEASE,
  25. "Restricts spectator modes for dead players. 0 = Any team. 1 = Only own team. 2 = No one; fade to black on death (previously mp_fadetoblack)."
  26. #ifdef GAME_DLL
  27. , MPForceCameraCallback
  28. #endif
  29. );
  30. ConVar mp_radar_showall(
  31. "mp_radar_showall",
  32. "0",
  33. FCVAR_REPLICATED | FCVAR_RELEASE,
  34. "Determines who should see all. 0 = default. 1 = both teams. 2 = Terrorists. 3 = Counter-Terrorists.",
  35. true, 0, //min
  36. true, 3 //max
  37. );
  38. ConVar mp_allowspectators(
  39. "mp_allowspectators",
  40. "1.0",
  41. FCVAR_REPLICATED,
  42. "toggles whether the server allows spectator mode or not" );
  43. ConVar mp_friendlyfire(
  44. "mp_friendlyfire",
  45. "0",
  46. FCVAR_REPLICATED | FCVAR_NOTIFY | FCVAR_RELEASE,
  47. "Allows team members to injure other members of their team"
  48. );
  49. ConVar mp_teammates_are_enemies(
  50. "mp_teammates_are_enemies",
  51. "0",
  52. FCVAR_REPLICATED | FCVAR_NOTIFY | FCVAR_RELEASE,
  53. "When set, your teammates act as enemies and all players are valid targets."
  54. );
  55. ConVar mp_buy_anywhere(
  56. "mp_buy_anywhere",
  57. "0",
  58. FCVAR_REPLICATED | FCVAR_NOTIFY | FCVAR_RELEASE,
  59. "When set, players can buy anywhere, not only in buyzones. 0 = default. 1 = both teams. 2 = Terrorists. 3 = Counter-Terrorists."
  60. );
  61. ConVar mp_buy_during_immunity(
  62. "mp_buy_during_immunity",
  63. "0",
  64. FCVAR_REPLICATED | FCVAR_NOTIFY | FCVAR_RELEASE,
  65. "When set, players can buy when immune, ignoring buytime. 0 = default. 1 = both teams. 2 = Terrorists. 3 = Counter-Terrorists."
  66. );