![]() |
new CS update screws up intercepting chat messages!?
Hey guys,
I upgraded my CS version today on STEAM. Ran my bot, everything is fine. I say something to my bot... and BAM. it crashes Code:
void BotClient_CS_SayText(void *p, int bot_index) Even when my bots are not supposed to chat, and i type a message there is something going horribly wrong. I am not sure WHERE it crashes as all i get is a 'read' error and no specific indications from CS/HL.EXE edit: i have sent cliffe a mail about this, i hope he responds at all... and if he does, with something that can help us out. |
Re: new CS update screws up intercepting chat messages!?
Glad it's not just me! I'm getting the exact same behavior with the latest CVS update. I'm getting a segfault whenever I try to chat. I have no clue why, but I thought it might be a Linux-only problem. Guess it could be steam, but I didn't notice the problem until I updated and recompiled from the latest CVS. I was going to try a rollback, but I didn't save the previous version.
|
Re: new CS update screws up intercepting chat messages!?
well, as soon asi disable catching this message in my code, everything runs fine. So its definatly something wrong there.
Also Cheating-Death does not work with this CS anymore (ver 4.22.0), so i guess they DID change something.. i still have no word of Cliffe. Dammit |
Re: new CS update screws up intercepting chat messages!?
perhaps it's because of strcpy(). try using strncpy() instead.
|
Re: new CS update screws up intercepting chat messages!?
Whistler, i can try that, but i don't think it will work. As i said, the code *worked* already, until the new CS update came around.
Too bad i threw out that engine interception stuff of Botman to figure out how engine messages are build up. Now i have to regrab that code or something. I think they have changed the chat message handler, perhaps a state more or less. Perhaps you are right and something is wrong with my code, although it worked perfectly before. Anyway, gtg check it out. |
Re: new CS update screws up intercepting chat messages!?
Message interception still seem to work fine here with my bot...
I'd advise to rewrite this function in a cleaner way anyway. And don't start reading the message at the first character, since the first character has always been a non-printable formatting character (color code). |
Re: new CS update screws up intercepting chat messages!?
@PMB;
I have added lots of debug lines, and guess what. The format HAS changed. Instead of sending the actual chat string when state = 1. I now get a string saying for "WHO" it is... ie, in CS 1.5 my debug lines say: Quote:
Quote:
So yes, you are correct in CS 1.5 and former CS 1.6 (former=before 14th june) you could do this. I bet they DID change in CS 1.6 the format... perhaps in 4 or maybe 5 states.. something like: state=0 remains same state=1 for who? state=2 sentence state=3 netname who sent message? i gtg figure this out soon. EDIT: what crashed my code was that strstr did NOT find ":" in the new sentence of CS 1.6, therefor returning NULL to strlen, which caused a crash... |
Re: new CS update screws up intercepting chat messages!?
I had to reimplement the engine debugging stuff, but eventually i got what i wanted:
Quote:
1 is entity index 2 some flag, so ya know to who and what, etc 3 don't know 4 the actual sentence |
Re: new CS update screws up intercepting chat messages!?
okay, i have fixed my bug. Here is my code now:
Code:
void BotClient_CS_SayText(void *p, int bot_index) |
Re: new CS update screws up intercepting chat messages!?
Thanks for the fix! It simplified this part of my code a LOT. :)
|
Re: new CS update screws up intercepting chat messages!?
no probs ;) will send the bill later :D
|
Re: new CS update screws up intercepting chat messages!?
[ double post is deleted ]
|
Re: new CS update screws up intercepting chat messages!?
...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. |
Re: new CS update screws up intercepting chat messages!?
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.
|
Re: new CS update screws up intercepting chat messages!?
Probably yes, but you would have to take care of who receives what yourself, then.
|
Re: new CS update screws up intercepting chat messages!?
i got word of turtlerock about the exact format:
Quote:
|
Re: new CS update screws up intercepting chat messages!?
thx to stefan for that info :D
|
Re: new CS update screws up intercepting chat messages!?
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.
|
Re: new CS update screws up intercepting chat messages!?
perhaps its in the debugging info. Did you try my new CVS updated source? (btw, post about this on the RealBot Source forum)
|
Re: new CS update screws up intercepting chat messages!?
Does anyone know if the UTIL_SayText utility function must also be revised to the new message format?
|
Re: new CS update screws up intercepting chat messages!?
Yes it should be revised, but thats merely for the looks, not for the game to work properly.
|
Re: new CS update screws up intercepting chat messages!?
I don't think so. I use the same TextMsg message that botman's UTIL_SayText uses to display a lot of debugging stuff for my bot, and so far all my messages display fine.
|
Re: new CS update screws up intercepting chat messages!?
sure they display fine... but have you taken a look at the new format in CS 1.6? If you use that format the 'looks' are different.. thats what i said ;)
|
Re: new CS update screws up intercepting chat messages!?
Code:
The only problem is it won't catch other bots' messages if other bots use botman's chat code. |
Re: new CS update screws up intercepting chat messages!?
just remove the if (isFakeClientCommand) check then... :)
|
All times are GMT +2. The time now is 20:19. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.