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
2.5 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. // memdbgon must be the last include file in a .cpp file!!!
  13. #include "tier0/memdbgon.h"
  14. void RegisterUserMessages()
  15. {
  16. //copy/paste from hl2
  17. usermessages->Register( "Geiger", 1 );
  18. usermessages->Register( "Train", 1 );
  19. usermessages->Register( "HudText", -1 );
  20. usermessages->Register( "SayText", -1 );
  21. usermessages->Register( "SayText2", -1 );
  22. usermessages->Register( "TextMsg", -1 );
  23. usermessages->Register( "HudMsg", -1 );
  24. usermessages->Register( "ResetHUD", 1); // called every respawn
  25. usermessages->Register( "GameTitle", 0 );
  26. usermessages->Register( "ItemPickup", -1 );
  27. usermessages->Register( "ShowMenu", -1 );
  28. usermessages->Register( "Shake", 13 );
  29. usermessages->Register( "Fade", 10 );
  30. usermessages->Register( "VGUIMenu", -1 ); // Show VGUI menu
  31. usermessages->Register( "Rumble", 3 ); // Send a rumble to a controller
  32. usermessages->Register( "Battery", 2 );
  33. usermessages->Register( "Damage", 18 ); // BUG: floats are sent for coords, no variable bitfields in hud & fixed size Msg
  34. usermessages->Register( "VoiceMask", VOICE_MAX_PLAYERS_DW*4 * 2 + 1 );
  35. usermessages->Register( "RequestState", 0 );
  36. usermessages->Register( "CloseCaption", -1 ); // Show a caption (by string id number)(duration in 10th of a second)
  37. usermessages->Register( "HintText", -1 ); // Displays hint text display
  38. usermessages->Register( "KeyHintText", -1 ); // Displays hint text display
  39. usermessages->Register( "SquadMemberDied", 0 );
  40. usermessages->Register( "AmmoDenied", 2 );
  41. usermessages->Register( "CreditsMsg", 1 );
  42. usermessages->Register( "CreditsPortalMsg", 1 );
  43. usermessages->Register( "LogoTimeMsg", 4 );
  44. usermessages->Register( "AchievementEvent", -1 );
  45. //new stuff for portal
  46. usermessages->Register( "EntityPortalled", sizeof( long ) + sizeof( long ) + sizeof( Vector ) + sizeof( QAngle ) ); //something got teleported through a portal
  47. usermessages->Register( "KillCam", -1 );
  48. // Voting
  49. usermessages->Register( "CallVoteFailed", 1 );
  50. usermessages->Register( "VoteStart", -1 );
  51. usermessages->Register( "VotePass", -1 );
  52. usermessages->Register( "VoteFailed", 2 );
  53. usermessages->Register( "VoteSetup", -1 ); // Initiates client-side voting UI
  54. // NVNT register haptic user messages
  55. RegisterHapticMessages();
  56. }