engine: common: cmd: add Cbuf_AddTextf wrapper
This commit is contained in:
parent
6b62f9c1b9
commit
b12b2aaf79
2 changed files with 13 additions and 0 deletions
|
@ -120,6 +120,18 @@ void Cbuf_AddText( const char *text )
|
||||||
Cbuf_AddTextToBuffer( &cmd_text, text );
|
Cbuf_AddTextToBuffer( &cmd_text, text );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Cbuf_AddTextf( const char *fmt, ... )
|
||||||
|
{
|
||||||
|
va_list va;
|
||||||
|
char buf[MAX_VA_STRING];
|
||||||
|
|
||||||
|
va_start( va, fmt );
|
||||||
|
Q_vsnprintf( buf, sizeof( buf ), fmt, va );
|
||||||
|
va_end( va );
|
||||||
|
|
||||||
|
Cbuf_AddText( buf );
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
============
|
============
|
||||||
Cbuf_AddFilteredText
|
Cbuf_AddFilteredText
|
||||||
|
|
|
@ -425,6 +425,7 @@ void FS_Shutdown( void );
|
||||||
void Cbuf_Init( void );
|
void Cbuf_Init( void );
|
||||||
void Cbuf_Clear( void );
|
void Cbuf_Clear( void );
|
||||||
void Cbuf_AddText( const char *text );
|
void Cbuf_AddText( const char *text );
|
||||||
|
void Cbuf_AddTextf( const char *text, ... ) _format( 1 );
|
||||||
void Cbuf_AddFilteredText( const char *text );
|
void Cbuf_AddFilteredText( const char *text );
|
||||||
void Cbuf_InsertText( const char *text );
|
void Cbuf_InsertText( const char *text );
|
||||||
void Cbuf_ExecStuffCmds( void );
|
void Cbuf_ExecStuffCmds( void );
|
||||||
|
|
Loading…
Add table
Reference in a new issue