.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Re: new CS update screws up intercepting chat messages!?
Old
  (#11)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: new CS update screws up intercepting chat messages!? - 16-06-2004

no probs will send the bill later


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: new CS update screws up intercepting chat messages!?
Old
  (#12)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: new CS update screws up intercepting chat messages!? - 17-06-2004

[ double post is deleted ]

Last edited by Whistler; 17-06-2004 at 14:27.. Reason: double post deleted. sorry.
  
Reply With Quote
Re: new CS update screws up intercepting chat messages!?
Old
  (#13)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: new CS update screws up intercepting chat messages!? - 17-06-2004

...and it isn't just "#Cstrike_Chat_All", here's what I've found in the new cstrike_english.txt file, go figure them out yourself
Code:
// Radio and chat strings can have control characters embedded to set colors.  For the control characters to be used, one must be at the start of the string.
// The control characters can be copied and pasted in notepad.
//  = 0x02 (STX) - Use team color up to the end of the player name.  This only works at the start of the string, and precludes using the other control characters.
//  = 0x03 (ETX) - Use team color from this point forward
//  = 0x04 (EOT) - Use location color from this point forward
//  = 0x01 (SOH) - Use normal color from this point forward

"Game_radio"					"%s1 (RADIO): %s2"
"Cstrike_Chat_CT"				"(Counter-Terrorist) %s1 :  %s2"
"Cstrike_Chat_T"				"(Terrorist) %s1 :  %s2"
"Cstrike_Chat_CT_Dead"				"*DEAD*(Counter-Terrorist) %s1 :  %s2"
"Cstrike_Chat_T_Dead"				"*DEAD*(Terrorist) %s1 :  %s2"
"Cstrike_Chat_Spec"				"(Spectator) %s1 :  %s2"
"Cstrike_Chat_All"				"%s1 :  %s2"
"Cstrike_Chat_AllDead"				"*DEAD* %s1 :  %s2"
"Cstrike_Chat_AllSpec"				"*SPEC* %s1 :  %s2"
"Cstrike_Name_Change"				"* %s1 changed name to %s2"
  
Reply With Quote
Re: new CS update screws up intercepting chat messages!?
Old
  (#14)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: new CS update screws up intercepting chat messages!? - 18-06-2004

well, I think catching the chat messages in ClientCommand() DLL function may be a good idea, and that should work in any versions of HL/CS/OP4 and whatever MOD. Just catch the "say" and "say_team" command and use pfnCmd_Args() to get the text.
  
Reply With Quote
Re: new CS update screws up intercepting chat messages!?
Old
  (#15)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: new CS update screws up intercepting chat messages!? - 18-06-2004

Probably yes, but you would have to take care of who receives what yourself, then.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: new CS update screws up intercepting chat messages!?
Old
  (#16)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: new CS update screws up intercepting chat messages!? - 18-06-2004

i got word of turtlerock about the exact format:

Quote:
The SayText message changed to allow for localization, and place names. Before, it looked like this, where the first character of 'text' was 0x02, and it included the player name and chat text:

Code:
MESSAGE_BEGIN( MSG_ONE, gmsgSayText, NULL, client->pev );
 WRITE_BYTE( ENTINDEX( pEntity ));
 WRITE_STRING( text );
MESSAGE_END();
Now, the message is constructed like this:

Code:
MESSAGE_BEGIN( MSG_ONE, gmsgSayText, NULL, client->pev );
 WRITE_BYTE( ENTINDEX( pEntity ));
 WRITE_STRING( pszFormat );
 WRITE_STRING( "" ); // will be filled in with player name
 WRITE_STRING( text );
 if ( placeName )
 {
  WRITE_STRING( placeName );
 }
MESSAGE_END();
The format string (pszFormat above) is something like "#Cstrike_Chat_CT", so if you are doing a strstr() for the player name in that string and not NULL checking, you would now crash. I don't have the RealBot source, so I can't tell if that's the problem or not.

Please let me know if this helps or if you need more info.

Matt Campbell



Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me

Last edited by stefanhendriks; 18-06-2004 at 09:37..
  
Reply With Quote
Re: new CS update screws up intercepting chat messages!?
Old
  (#17)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: new CS update screws up intercepting chat messages!? - 18-06-2004

thx to stefan for that info


  
Reply With Quote
Re: new CS update screws up intercepting chat messages!?
Old
  (#18)
minorgod
Member
 
minorgod's Avatar
 
Status: Offline
Posts: 43
Join Date: Jan 2004
Default Re: new CS update screws up intercepting chat messages!? - 18-06-2004

Stefan, I copied your bug fix and recompiled, but there's still some problem with the bot on Linux. It seems to work fine until you get about 6 bots on the server. Then suddenly, the human players start pinging over 300. Each additional bot increases the ping and it quickly becomes unplayable. I actually tried commenting out the entire contents of the BotClient_CS_SayText function, but that had no effect, so I think the problem lies elsewhere.


Nowhere does science promise emancipation.
  
Reply With Quote
Re: new CS update screws up intercepting chat messages!?
Old
  (#19)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: new CS update screws up intercepting chat messages!? - 19-06-2004

perhaps its in the debugging info. Did you try my new CVS updated source? (btw, post about this on the RealBot Source forum)


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: new CS update screws up intercepting chat messages!?
Old
  (#20)
cruft
Guest
 
Status:
Posts: n/a
Default Re: new CS update screws up intercepting chat messages!? - 21-06-2004

Does anyone know if the UTIL_SayText utility function must also be revised to the new message format?
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com