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.

80 lines
3.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "cbase.h"
  7. #include "usermessages.h"
  8. #include "shake.h"
  9. #include "voice_gamemgr.h"
  10. // NVNT include to register in haptic user messages
  11. #include "haptics/haptic_msgs.h"
  12. void RegisterUserMessages()
  13. {
  14. usermessages->Register( "Geiger", 1 ); // geiger info data
  15. usermessages->Register( "Train", 1 ); // train control data
  16. usermessages->Register( "HudText", -1 );
  17. usermessages->Register( "SayText", -1 );
  18. usermessages->Register( "SayText2", -1 );
  19. usermessages->Register( "TextMsg", -1 );
  20. usermessages->Register( "HudMsg", -1 );
  21. usermessages->Register( "ResetHUD", 1 ); // called every respawn
  22. usermessages->Register( "GameTitle", 0 ); // show game title
  23. usermessages->Register( "ItemPickup", -1 ); // for item history on screen
  24. usermessages->Register( "ShowMenu", -1 ); // show hud menu
  25. usermessages->Register( "Shake", 13 ); // shake view
  26. usermessages->Register( "Fade", 10 ); // fade HUD in/out
  27. usermessages->Register( "VGUIMenu", -1 ); // Show VGUI menu
  28. usermessages->Register( "Rumble", 3 ); // Send a rumble to a controller
  29. usermessages->Register( "CloseCaption", -1 ); // Show a caption (by string id number)(duration in 10th of a second)
  30. usermessages->Register( "SendAudio", -1 ); // play radio command
  31. usermessages->Register( "RawAudio", -1 ); // play a .wav as a radio command
  32. usermessages->Register( "VoiceMask", VOICE_MAX_PLAYERS_DW*4 * 2 + 1 );
  33. usermessages->Register( "RequestState", 0 );
  34. usermessages->Register( "BarTime", -1 ); // For the C4 progress bar.
  35. usermessages->Register( "Damage", -1 ); // for HUD damage indicators
  36. usermessages->Register( "RadioText", -1 ); // for radio text display
  37. usermessages->Register( "HintText", -1 ); // Displays hint text display
  38. usermessages->Register( "KeyHintText", -1 ); // Displays hint text display
  39. usermessages->Register( "ReloadEffect", 2 ); // a player reloading..
  40. usermessages->Register( "PlayerAnimEvent", -1 ); // jumping, firing, reload, etc.
  41. usermessages->Register( "AmmoDenied", 2 );
  42. usermessages->Register( "UpdateRadar", -1 );
  43. usermessages->Register( "KillCam", -1 );
  44. usermessages->Register( "MarkAchievement", -1 );
  45. // Voting
  46. usermessages->Register( "CallVoteFailed", -1 );
  47. usermessages->Register( "VoteStart", -1 );
  48. usermessages->Register( "VotePass", -1 );
  49. usermessages->Register( "VoteFailed", 2 );
  50. usermessages->Register( "VoteSetup", -1 ); // Initiates client-side voting UI
  51. // NVNT register haptic user messages
  52. RegisterHapticMessages();
  53. //=============================================================================
  54. // HPE_BEGIN:
  55. // [menglish] Registering PlayerStatsUpdate for Stats implementation
  56. // [dwenger] AchievementEvent: Necessary for server-side achievement awarding
  57. // [tj] Added support for absolute current match statistics updates
  58. //=============================================================================
  59. usermessages->Register( "PlayerStatsUpdate_DEPRECATED", -1 ); // Protocol changed, this message replaced below
  60. usermessages->Register( "AchievementEvent", -1 );
  61. usermessages->Register( "MatchEndConditions", -1 ); //The end conditions for the match. long frag limit, long max rounds, long rounds needed won, and long time
  62. usermessages->Register( "MatchStatsUpdate", -1 );
  63. usermessages->Register( "PlayerStatsUpdate", -1 ); //Processes stats update
  64. //=============================================================================
  65. // HPE_END
  66. //=============================================================================
  67. }