Alright been looking around to locate the chat handling functions so that I can incorporate something along the lines of what shrubet did.
So I’ve found:
void trap_SendConsoleCommand( int exec_when, const char *text ) {
syscall( G_SEND_CONSOLE_COMMAND, exec_when, text );
}
this calls the system function and I think:
static void CG_MessageSend_f( void )
{
char messageText[ 256 ];
int messageType;
// get values
trap_Cvar_VariableStringBuffer( "cg_messageType", messageText, 256 );
messageType = atoi( messageText );
trap_Cvar_VariableStringBuffer( "cg_messageText", messageText, 256 );
// reset values
trap_Cvar_Set( "cg_messageText", "" );
trap_Cvar_Set( "cg_messageType", "" );
trap_Cvar_Set( "cg_messagePlayer", "" );
// don't send empty messages
if( messageText[ 0 ] == '\0' )
return;
this is where the parsing for chats could be done? Any help on how to edit this or if this is even correct would be a huge help. Haven’t dealt with C++ since college and C is close but even more foreign, so bare with me till I get my feet down here.
Thanks