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.

97 lines
4.6 KiB

  1. //========= Copyright (c) 1996-2005, 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. // memdbgon must be the last include file in a .cpp file!!!
  11. #include "tier0/memdbgon.h"
  12. void RegisterUserMessages()
  13. {
  14. //copy/paste from hl2
  15. usermessages->Register( "Geiger", 1 );
  16. usermessages->Register( "Train", 1 );
  17. usermessages->Register( "HudText", -1 );
  18. usermessages->Register( "SayText", -1 );
  19. usermessages->Register( "SayText2", -1 );
  20. usermessages->Register( "TextMsg", -1 );
  21. usermessages->Register( "HudMsg", -1 );
  22. usermessages->Register( "ResetHUD", 1); // called every respawn
  23. usermessages->Register( "GameTitle", 0 );
  24. usermessages->Register( "ItemPickup", -1 );
  25. usermessages->Register( "ShowMenu", -1 );
  26. usermessages->Register( "Shake", 13 );
  27. usermessages->Register( "Tilt", 22 );
  28. usermessages->Register( "Fade", 10 );
  29. usermessages->Register( "VGUIMenu", -1 ); // Show VGUI menu
  30. usermessages->Register( "Rumble", 3 ); // Send a rumble to a controller
  31. usermessages->Register( "Battery", 2 );
  32. usermessages->Register( "Damage", 18 ); // BUG: floats are sent for coords, no variable bitfields in hud & fixed size Msg
  33. usermessages->Register( "VoiceMask", VOICE_MAX_PLAYERS_DW*4 * 2 + 1 );
  34. usermessages->Register( "RequestState", 0 );
  35. usermessages->Register( "CloseCaption", -1 ); // Show a caption (by string id number)(duration in 10th of a second)
  36. usermessages->Register( "CloseCaptionDirect", -1 ); // Show a forced 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( "LogoTimeMsg", 4 );
  43. usermessages->Register( "AchievementEvent", -1 );
  44. usermessages->Register( "UpdateJalopyRadar", -1 );
  45. usermessages->Register( "CurrentTimescale", 4 ); // Send one float for the new timescale
  46. usermessages->Register( "DesiredTimescale", 13 ); // Send timescale and some blending vars
  47. //new stuff for portal
  48. usermessages->Register( "CreditsPortalMsg", 1 );
  49. #ifdef PORTAL2
  50. usermessages->Register( "InventoryFlash", sizeof( float ) + 1 );
  51. usermessages->Register( "IndicatorFlash", sizeof( float ) + 1 );
  52. usermessages->Register( "ControlHelperAnimate", 2 );
  53. usermessages->Register( "TakePhoto", sizeof( long ) + sizeof( uint8 ) );
  54. usermessages->Register( "Flash", sizeof( float ) + sizeof( Vector ) );
  55. usermessages->Register( "HudPingIndicator", sizeof( Vector ) );
  56. usermessages->Register( "OpenRadialMenu", -1 );
  57. usermessages->Register( "AddLocator", -1 );
  58. usermessages->Register( "MPMapCompleted", sizeof( char ) + sizeof( char ) );
  59. usermessages->Register( "MPMapIncomplete", sizeof( char ) + sizeof( char ) );
  60. usermessages->Register( "MPMapCompletedData", -1 );
  61. usermessages->Register( "MPTauntEarned", -1 );
  62. usermessages->Register( "MPTauntUnlocked", -1 );
  63. usermessages->Register( "MPTauntLocked", -1 );
  64. usermessages->Register( "MPAllTauntsLocked", -1 );
  65. // Portal effects
  66. usermessages->Register( "PortalFX_Surface", -1 );
  67. // Paint messages
  68. usermessages->Register( "PaintWorld", -1 );
  69. usermessages->Register( "PaintEntity", sizeof( long ) + sizeof( uint8 ) + sizeof( Vector ) );
  70. usermessages->Register( "ChangePaintColor", sizeof( long ) + sizeof( uint8 ) );
  71. usermessages->Register( "PaintBombExplode", sizeof( Vector ) + sizeof( uint8 ) + sizeof( uint8 ) + sizeof( BYTE ) );
  72. usermessages->Register( "RemoveAllPaint", 0 );
  73. usermessages->Register( "PaintAllSurfaces", sizeof( BYTE ) );
  74. usermessages->Register( "RemovePaint", sizeof( long ) );
  75. usermessages->Register( "StartSurvey", sizeof( long ) );
  76. usermessages->Register( "ApplyHitBoxDamageEffect", sizeof( long ) + sizeof( uint8 ) + sizeof( uint8 ) );
  77. usermessages->Register( "SetMixLayerTriggerFactor", -1 );
  78. usermessages->Register( "TransitionFade", sizeof( float ) );
  79. usermessages->Register( "ScoreboardTempUpdate", sizeof( long ) + sizeof( long ) );
  80. usermessages->Register( "ChallengeModeCheatSession", -1 );
  81. usermessages->Register( "ChallengeModeCloseAllUI", -1 );
  82. // FIXME: Bring this back for DLC2
  83. //usermessages->Register( "MPVSGameStart", sizeof( char ) );
  84. //usermessages->Register( "MPVSGameOver", sizeof( BYTE ) );
  85. //usermessages->Register( "MPVSRoundEnd", sizeof( BYTE ) );
  86. #endif // PORTAL2
  87. }