From f57dbeb60f7a8ebafe6e2b5f8167b59fbc53cbec Mon Sep 17 00:00:00 2001 From: TheMadSword Date: Thu, 7 May 2015 09:38:25 -0400 Subject: [PATCH 1/3] Increased PrintToChat & PrintToChatAll buffer size from 192 to 254; works in CSS/CSGO; dunno for the rest --- core/smn_halflife.cpp | 2 +- plugins/include/halflife.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/smn_halflife.cpp b/core/smn_halflife.cpp index d8e025075..0f0609ccb 100644 --- a/core/smn_halflife.cpp +++ b/core/smn_halflife.cpp @@ -320,7 +320,7 @@ static cell_t PrintToChat(IPluginContext *pContext, const cell_t *params) g_SourceMod.SetGlobalTarget(client); - char buffer[192]; + char buffer[254]; { DetectExceptions eh(pContext); diff --git a/plugins/include/halflife.inc b/plugins/include/halflife.inc index 4514bb086..638523277 100644 --- a/plugins/include/halflife.inc +++ b/plugins/include/halflife.inc @@ -323,7 +323,7 @@ native PrintToChat(client, const String:format[], any:...); */ stock PrintToChatAll(const String:format[], any:...) { - decl String:buffer[192]; + decl String:buffer[254]; for (new i = 1; i <= MaxClients; i++) { From b70873e046fffd57bb91b63d3809b6a46fad4c84 Mon Sep 17 00:00:00 2001 From: TheMadSword Date: Thu, 7 May 2015 22:55:15 -0400 Subject: [PATCH 2/3] Changed buffer size for games with ChatSayText='yes', tested in CSS&CSGO w/ adding the kv in engine.cs*.txt --- core/HalfLife2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/HalfLife2.cpp b/core/HalfLife2.cpp index d52bc6fa7..4c854f9b3 100644 --- a/core/HalfLife2.cpp +++ b/core/HalfLife2.cpp @@ -498,7 +498,7 @@ bool CHalfLife2::TextMsg(int client, int dest, const char *msg) /* Use SayText user message instead */ if (chat_saytext != NULL && strcmp(chat_saytext, "yes") == 0) { - char buffer[192]; + char buffer[253]; UTIL_Format(buffer, sizeof(buffer), "%s\1\n", msg); #if SOURCE_ENGINE == SE_DOTA From 6686badc9301ce451119e79d44a8fea65d05203e Mon Sep 17 00:00:00 2001 From: TheMadSword Date: Sat, 9 May 2015 09:22:07 -0400 Subject: [PATCH 3/3] Increased PrintHint and PrintCenter buffer --- core/smn_halflife.cpp | 4 ++-- plugins/include/halflife.inc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/smn_halflife.cpp b/core/smn_halflife.cpp index 0f0609ccb..76c58e38c 100644 --- a/core/smn_halflife.cpp +++ b/core/smn_halflife.cpp @@ -354,7 +354,7 @@ static cell_t PrintCenterText(IPluginContext *pContext, const cell_t *params) g_SourceMod.SetGlobalTarget(client); - char buffer[192]; + char buffer[254]; { DetectExceptions eh(pContext); @@ -388,7 +388,7 @@ static cell_t PrintHintText(IPluginContext *pContext, const cell_t *params) g_SourceMod.SetGlobalTarget(client); - char buffer[192]; + char buffer[254]; { DetectExceptions eh(pContext); g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2); diff --git a/plugins/include/halflife.inc b/plugins/include/halflife.inc index 638523277..93dbcb278 100644 --- a/plugins/include/halflife.inc +++ b/plugins/include/halflife.inc @@ -356,7 +356,7 @@ native PrintCenterText(client, const String:format[], any:...); */ stock PrintCenterTextAll(const String:format[], any:...) { - decl String:buffer[192]; + decl String:buffer[254]; for (new i = 1; i <= MaxClients; i++) { @@ -389,7 +389,7 @@ native PrintHintText(client, const String:format[], any:...); */ stock PrintHintTextToAll(const String:format[], any:...) { - decl String:buffer[192]; + decl String:buffer[254]; for (new i = 1; i <= MaxClients; i++) {