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
|