Advertisement
slatenails

Untitled

Jul 31st, 2013
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.98 KB | None | 0 0
  1. diff -r af45c72387f5 src/chat.cpp
  2. --- a/src/chat.cpp  Sat Jul 27 09:47:16 2013 +0200
  3. +++ b/src/chat.cpp  Wed Jul 31 11:33:52 2013 +0300
  4. @@ -106,6 +106,7 @@
  5.  
  6.  EXTERN_CVAR( Int, con_colorinmessages );
  7.  EXTERN_CVAR( Int, chat_sound );
  8. +EXTERN_CVAR( Int, msglevel )
  9.  
  10.  //*****************************************************************************
  11.  FStringCVar    *g_ChatMacros[10] =
  12. @@ -464,7 +465,8 @@
  13.     Printf( ulChatLevel, "%s\n", OutString.GetChars() );
  14.  
  15.     // [BB] If the user doesn't want to see the messages, they shouldn't make a sound.
  16. -   if ( show_messages )
  17. +   // [Dusk] Also do not play the sound if the msglevel CVar filters this.
  18. +   if ( show_messages && ( msglevel <= ulChatLevel ))
  19.     {
  20.         // [RC] User can choose the chat sound.
  21.         if ( chat_sound == 1 ) // Default
  22. diff -r af45c72387f5 src/m_options.cpp
  23. --- a/src/m_options.cpp Sat Jul 27 09:47:16 2013 +0200
  24. +++ b/src/m_options.cpp Wed Jul 31 11:33:52 2013 +0300
  25. @@ -1166,7 +1166,11 @@
  26.  static value_t MessageLevels[] = {
  27.     { 0.0, "Item Pickup" },
  28.     { 1.0, "Obituaries" },
  29. -   { 2.0, "Critical Messages" }
  30. +   { 2.0, "Critical Messages" },
  31. +
  32. +   // [Dusk] Added chat and team chat here
  33. +   { 3.0, "Chat Messages" },
  34. +   { 4.0, "Team Chat Messages" },
  35.  };
  36.  
  37.  static value_t MessageColorLevels[] = {
  38. @@ -1188,7 +1192,7 @@
  39.     { discrete, "Show messages",        {&show_messages},       {2.0}, {0.0},   {0.0}, {OnOff} },
  40.     { discrete, "Show obituaries",      {&show_obituaries},     {2.0}, {0.0},   {0.0}, {OnOff} },
  41.     { discrete, "Chat sound",           {&chat_sound},          {4.0}, {0.0},   {0.0}, {ChatSounds} },
  42. -   { discrete, "Minimum message level",{&msglevel},            {3.0}, {0.0},   {0.0}, {MessageLevels} },
  43. +   { discrete, "Minimum message level",{&msglevel},            {5.0}, {0.0},   {0.0}, {MessageLevels} },
  44.     { discrete, "Center messages",      {&con_centernotify},    {2.0}, {0.0},   {0.0}, {OnOff} },
  45.     { discrete, "Color in messages",    {&con_colorinmessages}, {3.0}, {0.0},   {0.0}, {MessageColorLevels} },
  46.     { redtext,  " ",                    {NULL},                 {0.0}, {0.0},   {0.0}, {NULL} },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement