Browse Source

engine: convert Cbuf_AddText with va to Cbuf_AddTextf

pull/2/head
Alibek Omarov 2 years ago
parent
commit
d667845777
  1. 2
      engine/client/cl_gameui.c
  2. 2
      engine/client/cl_main.c
  3. 2
      engine/client/cl_parse.c
  4. 4
      engine/client/in_touch.c
  5. 2
      engine/client/ref_common.c
  6. 6
      engine/common/host.c
  7. 2
      engine/server/sv_cmds.c
  8. 2
      engine/server/sv_filter.c
  9. 2
      engine/server/sv_init.c
  10. 2
      engine/server/sv_save.c

2
engine/client/cl_gameui.c

@ -838,7 +838,7 @@ send client connect
*/ */
static void GAME_EXPORT pfnClientJoin( const netadr_t adr ) static void GAME_EXPORT pfnClientJoin( const netadr_t adr )
{ {
Cbuf_AddText( va( "connect %s\n", NET_AdrToString( adr ))); Cbuf_AddTextf( "connect %s\n", NET_AdrToString( adr ));
} }
/* /*

2
engine/client/cl_main.c

@ -2086,7 +2086,7 @@ void CL_ConnectionlessPacket( netadr_t from, sizebuf_t *msg )
if( NET_CompareAdr( from, cls.legacyserver )) if( NET_CompareAdr( from, cls.legacyserver ))
{ {
Cbuf_AddText( va( "connect %s legacy\n", NET_AdrToString( from ))); Cbuf_AddTextf( "connect %s legacy\n", NET_AdrToString( from ));
memset( &cls.legacyserver, 0, sizeof( cls.legacyserver )); memset( &cls.legacyserver, 0, sizeof( cls.legacyserver ));
} }
} }

2
engine/client/cl_parse.c

@ -2001,7 +2001,7 @@ void CL_ParseExec( sizebuf_t *msg )
COM_FileBase( clgame.mapname, mapname ); COM_FileBase( clgame.mapname, mapname );
if ( COM_CheckString( mapname ) ) if ( COM_CheckString( mapname ) )
Cbuf_AddText( va( "exec %s.cfg\n", mapname ) ); Cbuf_AddTextf( "exec %s.cfg\n", mapname );
} }
} }

4
engine/client/in_touch.c

@ -737,7 +737,7 @@ static void Touch_ReloadConfig_f( void )
touch.edit = touch.selection = NULL; touch.edit = touch.selection = NULL;
touch.resize_finger = touch.move_finger = touch.look_finger = touch.wheel_finger = -1; touch.resize_finger = touch.move_finger = touch.look_finger = touch.wheel_finger = -1;
Cbuf_AddText( va("exec %s\n", touch_config_file->string ) ); Cbuf_AddTextf( "exec %s\n", touch_config_file->string );
} }
static touch_button_t *Touch_AddButton( touchbuttonlist_t *list, static touch_button_t *Touch_AddButton( touchbuttonlist_t *list,
@ -1111,7 +1111,7 @@ static void Touch_InitConfig( void )
//pfnGetScreenInfo( NULL ); //HACK: update hud screen parameters like iHeight //pfnGetScreenInfo( NULL ); //HACK: update hud screen parameters like iHeight
if( FS_FileExists( touch_config_file->string, true ) ) if( FS_FileExists( touch_config_file->string, true ) )
{ {
Cbuf_AddText( va( "exec \"%s\"\n", touch_config_file->string ) ); Cbuf_AddTextf( "exec \"%s\"\n", touch_config_file->string );
Cbuf_Execute(); Cbuf_Execute();
} }
else else

2
engine/client/ref_common.c

@ -224,7 +224,7 @@ static qboolean R_DoResetGamma( void )
static qboolean R_Init_Video_( const int type ) static qboolean R_Init_Video_( const int type )
{ {
host.apply_opengl_config = true; host.apply_opengl_config = true;
Cbuf_AddText( va( "exec %s.cfg", ref.dllFuncs.R_GetConfigName())); Cbuf_AddTextf( "exec %s.cfg", ref.dllFuncs.R_GetConfigName());
Cbuf_Execute(); Cbuf_Execute();
host.apply_opengl_config = false; host.apply_opengl_config = false;

6
engine/common/host.c

@ -827,7 +827,7 @@ void Host_Userconfigd_f( void )
for( i = 0; i < t->numfilenames; i++ ) for( i = 0; i < t->numfilenames; i++ )
{ {
Cbuf_AddText( va("exec %s\n", t->filenames[i] ) ); Cbuf_AddTextf( "exec %s\n", t->filenames[i] );
} }
Mem_Free( t ); Mem_Free( t );
@ -1221,7 +1221,7 @@ int EXPORT Host_Main( int argc, char **argv, const char *progname, int bChangeGa
Wcon_ShowConsole( false ); // hide console Wcon_ShowConsole( false ); // hide console
#endif #endif
// execute startup config and cmdline // execute startup config and cmdline
Cbuf_AddText( va( "exec %s.rc\n", SI.rcName )); Cbuf_AddTextf( "exec %s.rc\n", SI.rcName );
Cbuf_Execute(); Cbuf_Execute();
if( !host.config_executed ) if( !host.config_executed )
{ {
@ -1255,7 +1255,7 @@ int EXPORT Host_Main( int argc, char **argv, const char *progname, int bChangeGa
// execute server.cfg after commandline // execute server.cfg after commandline
// so we have a chance to set servercfgfile // so we have a chance to set servercfgfile
Cbuf_AddText( va( "exec %s\n", Cvar_VariableString( "servercfgfile" ))); Cbuf_AddTextf( "exec %s\n", Cvar_VariableString( "servercfgfile" ));
Cbuf_Execute(); Cbuf_Execute();
} }

2
engine/server/sv_cmds.c

@ -394,7 +394,7 @@ void SV_HazardCourse_f( void )
// special case for Gunman Chronicles: playing avi-file // special case for Gunman Chronicles: playing avi-file
if( FS_FileExists( va( "media/%s.avi", GI->trainmap ), false )) if( FS_FileExists( va( "media/%s.avi", GI->trainmap ), false ))
{ {
Cbuf_AddText( va( "wait; movie %s\n", GI->trainmap )); Cbuf_AddTextf( "wait; movie %s\n", GI->trainmap );
Host_EndGame( true, DEFAULT_ENDGAME_MESSAGE ); Host_EndGame( true, DEFAULT_ENDGAME_MESSAGE );
} }
else COM_NewGame( GI->trainmap ); else COM_NewGame( GI->trainmap );

2
engine/server/sv_filter.c

@ -159,7 +159,7 @@ static void SV_BanID_f( void )
cidfilter = filter; cidfilter = filter;
if( cl && !Q_stricmp( Cmd_Argv( Cmd_Argc() - 1 ), "kick" )) if( cl && !Q_stricmp( Cmd_Argv( Cmd_Argc() - 1 ), "kick" ))
Cbuf_AddText( va( "kick #%d \"Kicked and banned\"\n", cl->userid )); Cbuf_AddTextf( "kick #%d \"Kicked and banned\"\n", cl->userid );
} }
static void SV_ListID_f( void ) static void SV_ListID_f( void )

2
engine/server/sv_init.c

@ -628,7 +628,7 @@ void SV_ActivateServer( int runPhysics )
const char *cycle = Cvar_VariableString( "mapchangecfgfile" ); const char *cycle = Cvar_VariableString( "mapchangecfgfile" );
if( COM_CheckString( cycle )) if( COM_CheckString( cycle ))
Cbuf_AddText( va( "exec %s\n", cycle )); Cbuf_AddTextf( "exec %s\n", cycle );
} }
} }

2
engine/server/sv_save.c

@ -1739,7 +1739,7 @@ static qboolean SaveGameSlot( const char *pSaveName, const char *pSaveComment )
} }
// pending the preview image for savegame // pending the preview image for savegame
Cbuf_AddText( va( "saveshot \"%s\"\n", pSaveName )); Cbuf_AddTextf( "saveshot \"%s\"\n", pSaveName );
Con_Printf( "Saving game to %s...\n", name ); Con_Printf( "Saving game to %s...\n", name );
version = SAVEGAME_VERSION; version = SAVEGAME_VERSION;

Loading…
Cancel
Save