Raised This Month: $32 Target: $400
 8% 

Solved [L4D2] Comp Rework Patches


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
canadianjeff
BANNED
Join Date: Sep 2016
Old 10-25-2020 , 17:14   [L4D2] Comp Rework Patches
#1

on github is the l4d2 comp rework at https://github.com/SirPlease/L4D2-Competitive-Rework
I do not have a github account so I need someone else to help push these patches upstream to SirPlease github

what these patches does is remove all the printtoserver with all the escaped hex control codes which is not really needed to show on the server as it is sent to all the clients

the code below is in git diff format for easy import into a branch or fork

Code:
diff --git a/addons/sourcemod/scripting/1v1_skeetstats.sp b/addons/sourcemod/scripting/1v1_skeetstats.sp
index a65ac3c..da2edbf 100644
--- a/addons/sourcemod/scripting/1v1_skeetstats.sp
+++ b/addons/sourcemod/scripting/1v1_skeetstats.sp
@@ -785,7 +785,7 @@ String: PrintSkeetStats(toClient)
         StrCat(printBuffer, sizeof(printBuffer), tmpBuffer);
         
         if (!toClient) {
-            PrintToServer("\x01%s", printBuffer);
+            //PrintToServer("\x01%s", printBuffer);
             PrintToChatAll("\x01%s", printBuffer);
         } else if (IsClientAndInGame(toClient)) {
             PrintToChat(toClient, "\x01%s", printBuffer);
@@ -799,7 +799,7 @@ String: PrintSkeetStats(toClient)
         StrCat(printBuffer, sizeof(printBuffer), tmpBuffer);
         
         if (!toClient) {
-            PrintToServer("\x01%s", printBuffer);
+            //PrintToServer("\x01%s", printBuffer);
             PrintToChatAll("\x01%s", printBuffer);
         } else if (IsClientAndInGame(toClient)) {
             PrintToChat(toClient, "\x01%s", printBuffer);
@@ -831,7 +831,7 @@ String: PrintSkeetStats(toClient)
         StrCat(printBuffer, sizeof(printBuffer), tmpBuffer);
         
         if (!toClient) {
-            PrintToServer("\x01%s", printBuffer);
+            //PrintToServer("\x01%s", printBuffer);
             PrintToChatAll("\x01%s", printBuffer);
         } else if (IsClientAndInGame(toClient)) {
             PrintToChat(toClient, "\x01%s", printBuffer);
diff --git a/addons/sourcemod/scripting/l4d2_penalty_bonus.sp b/addons/sourcemod/scripting/l4d2_penalty_bonus.sp
index ef9ed97..f845182 100644
--- a/addons/sourcemod/scripting/l4d2_penalty_bonus.sp
+++ b/addons/sourcemod/scripting/l4d2_penalty_bonus.sp
@@ -398,7 +398,7 @@ stock DisplayBonus(client=-1)
         } else if (client) {
             PrintToChat(client, "\x01%s: %s", msgPartHdr, msgPartBon);
         } else {
-            PrintToServer("\x01%s: %s", msgPartHdr, msgPartBon);
+            //PrintToServer("\x01%s: %s", msgPartHdr, msgPartBon);
         }
     }
 }
@@ -424,7 +424,7 @@ stock ReportChange(bonusChange, client=-1, absoluteSet=false)
     } else if (client) {
         PrintToChat(client, "\x01%s", msgPartBon);
     } else {
-        PrintToServer("\x01%s", msgPartBon);
+        //PrintToServer("\x01%s", msgPartBon);
     }
 }
 
diff --git a/addons/sourcemod/scripting/l4d2_playstats.sp b/addons/sourcemod/scripting/l4d2_playstats.sp
index 3227d73..0d77d63 100644
--- a/addons/sourcemod/scripting/l4d2_playstats.sp
+++ b/addons/sourcemod/scripting/l4d2_playstats.sp
@@ -3135,7 +3135,7 @@ stock DisplayStatsMVPChat( client, bool:bRound = true, bool:bTeam = true, iTeam
     printBuffer = GetMVPChatString( bRound, bTeam, iTeam );
     
     if ( client == -1 ) {
-        PrintToServer("\x01%s", printBuffer);
+        //PrintToServer("\x01%s", printBuffer);
     }
 
     // PrintToChatAll has a max length. Split it in to individual lines to output separately
@@ -3147,7 +3147,7 @@ stock DisplayStatsMVPChat( client, bool:bRound = true, bool:bTeam = true, iTeam
     }
     else if ( client == 0 ) {
         for ( i = 0; i < intPieces; i++ ) {
-            PrintToServer("\x01%s", strLines[i]);
+            //PrintToServer("\x01%s", strLines[i]);
         }
     }
     else {
@@ -3718,7 +3718,7 @@ stock DisplayStatsFunFactChat( client, bool:bRound = true, bool:bTeam = true, iT
     if ( !strlen(printBuffer) ) { return; }
     
     if ( client == -1 ) {
-        PrintToServer("\x01%s", printBuffer);
+        //PrintToServer("\x01%s", printBuffer);
     }
 
     // PrintToChatAll has a max length. Split it in to individual lines to output separately
@@ -3731,7 +3731,7 @@ stock DisplayStatsFunFactChat( client, bool:bRound = true, bool:bTeam = true, iT
     }
     else if ( client == 0 ) {
         for ( i = 0; i < intPieces; i++ ) {
-            PrintToServer("\x01%s", strLines[i]);
+            //PrintToServer("\x01%s", strLines[i]);
         }
     }
     else {
diff --git a/addons/sourcemod/scripting/survivor_mvp.sp b/addons/sourcemod/scripting/survivor_mvp.sp
index 46af861..868f25e 100644
--- a/addons/sourcemod/scripting/survivor_mvp.sp
+++ b/addons/sourcemod/scripting/survivor_mvp.sp
@@ -557,7 +557,7 @@ public Action:SurvivorMVP_Cmd(client, args)
     }
     else
     {
-        PrintToServer("\x01%s", printBuffer);
+        //PrintToServer("\x01%s", printBuffer);
     }
     PrintLoserz(true, client);
 }
@@ -573,7 +573,7 @@ public Action:delayedMVPPrint(Handle:timer)
     new String:strLines[8][192];
     
     printBuffer = GetMVPString();
-    PrintToServer("\x01%s", printBuffer);
+    //PrintToServer("\x01%s", printBuffer);
     
     // PrintToChatAll has a max length. Split it in to individual lines to output separately
     new intPieces = ExplodeString(printBuffer, "\n", strLines, sizeof(strLines), sizeof(strLines[]));
Attached Files
File Type: diff printtoserverhex.diff (4.8 KB, 36 views)

Last edited by canadianjeff; 10-27-2020 at 01:15.
canadianjeff is offline
canadianjeff
BANNED
Join Date: Sep 2016
Old 10-25-2020 , 17:17   Re: [L4D2] Comp Rework Patches
#2

and for the love of god guys please stop using printtoserver + escaped hex codes it is actually pointless

Last edited by canadianjeff; 10-25-2020 at 23:36.
canadianjeff is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 10-26-2020 , 11:59   Re: [L4D2] Comp Rework Patches
#3

Just create an account and register that as an issue on github, Sir usually answers fast.
__________________
Marttt is offline
canadianjeff
BANNED
Join Date: Sep 2016
Old 10-26-2020 , 14:01   Re: [L4D2] Comp Rework Patches
#4

sorry but could you do this for me please? the whole point of this thread was to get help getting these patches pulled up to SIRS master repo

Last edited by canadianjeff; 10-26-2020 at 14:37.
canadianjeff is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 10-26-2020 , 16:00   Re: [L4D2] Comp Rework Patches
#5

I really can't do that for you, is really simple creating a Github account.
Anyway, Sir may have his reasons to print to console too, I gonna open an issue linking to this post, then maybe he edits or removes the hex from the console, or even, the PrintToServer.


Done: https://github.com/SirPlease/L4D2-Co...ork/issues/181
__________________

Last edited by Marttt; 10-26-2020 at 16:04.
Marttt is offline
spumer
Senior Member
Join Date: Aug 2011
Old 10-26-2020 , 16:03   Re: [L4D2] Comp Rework Patches
#6

Creating thread and answering here is longer than creating account and making PR or issue.
Dude, don't waste your and others time.

It will be good practice and github account can help you in future. Just Do It.
__________________
spumer is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 10-26-2020 , 17:46   Re: [L4D2] Comp Rework Patches
#7

Sir already made the changes.

https://github.com/SirPlease/L4D2-Co...e7bd162cf434e9
__________________
Marttt is offline
canadianjeff
BANNED
Join Date: Sep 2016
Old 10-26-2020 , 17:46   Re: [L4D2] Comp Rework Patches
#8

it looks like they made the changes on the master branch without giving me any credit for spotting them

thats ok I will leave this thread up and open for archival reasons
canadianjeff is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 10-26-2020 , 18:59   Re: [L4D2] Comp Rework Patches
#9

Quote:
Originally Posted by canadianjeff View Post
it looks like they made the changes on the master branch without giving me any credit for spotting them

thats ok I will leave this thread up and open for archival reasons
Why would you get credit when you didn't even report the changes ?
__________________

Last edited by Spirit_12; 10-26-2020 at 19:07. Reason: highlighted the key word
Spirit_12 is offline
canadianjeff
BANNED
Join Date: Sep 2016
Old 10-26-2020 , 19:05   Re: [L4D2] Comp Rework Patches
#10

I did tho just look at this thread I made this thread I found the changes he used the changes I found therefor I should get credit

just cause someone else reported the changes that I found maybe we both need credit

Last edited by canadianjeff; 10-26-2020 at 19:07.
canadianjeff is offline
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode