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. :)
|
All times are GMT +2. The time now is 12:47. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.