mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-14 21:20:26 +01:00
engine: common: cmd: add Cbuf_AddTextf wrapper
This commit is contained in:
parent
6b62f9c1b9
commit
b12b2aaf79
@ -120,6 +120,18 @@ void Cbuf_AddText( const char *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
|
||||
|
@ -425,6 +425,7 @@ void FS_Shutdown( void );
|
||||
void Cbuf_Init( void );
|
||||
void Cbuf_Clear( void );
|
||||
void Cbuf_AddText( const char *text );
|
||||
void Cbuf_AddTextf( const char *text, ... ) _format( 1 );
|
||||
void Cbuf_AddFilteredText( const char *text );
|
||||
void Cbuf_InsertText( const char *text );
|
||||
void Cbuf_ExecStuffCmds( void );
|
||||
|
Loading…
Reference in New Issue
Block a user