Skip to content
Permalink
Browse files

csgo: enable SayText + raise msg limits (#1118)

Rised limits for SayText and HintText protobuffs in csgo, also switched from TextMsg to SayText in csgo.
  • Loading branch information
GAMMACASE committed Feb 27, 2020
1 parent bcd5e40 commit 4a8e0799bd0c588169c34cfc26c7eceae1ee0c87
Showing with 14 additions and 0 deletions.
  1. +4 −0 core/HalfLife2.cpp
  2. +9 −0 core/smn_halflife.cpp
  3. +1 −0 gamedata/core.games/common.games.txt
@@ -513,7 +513,11 @@ bool CHalfLife2::TextMsg(int client, int dest, const char *msg)
/* Use SayText user message instead */
if (chat_saytext != NULL && strcmp(chat_saytext, "yes") == 0)
{
#if SOURCE_ENGINE == SE_CSGO
char buffer[2022];
#else
char buffer[253];
#endif
ke::SafeSprintf(buffer, sizeof(buffer), "%s\1\n", msg);

#if SOURCE_ENGINE == SE_CSGO
@@ -329,7 +329,11 @@ static cell_t PrintToChat(IPluginContext *pContext, const cell_t *params)

g_SourceMod.SetGlobalTarget(client);

#if SOURCE_ENGINE == SE_CSGO
char buffer[2023];
#else
char buffer[254];
#endif

{
DetectExceptions eh(pContext);
@@ -397,7 +401,12 @@ static cell_t PrintHintText(IPluginContext *pContext, const cell_t *params)

g_SourceMod.SetGlobalTarget(client);

#if SOURCE_ENGINE == SE_CSGO
char buffer[0xFFFF];
#else
char buffer[254];
#endif

{
DetectExceptions eh(pContext);
g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
@@ -200,6 +200,7 @@
"Keys"
{
"HudRadioMenuMsg" "ShowMenu"
"ChatSayText" "yes"
}
}

0 comments on commit 4a8e079

Please sign in to comment.
You can’t perform that action at this time.