diff --git a/engine/client/cl_custom.c b/engine/client/cl_custom.c index b279b361..b028066e 100644 --- a/engine/client/cl_custom.c +++ b/engine/client/cl_custom.c @@ -78,7 +78,7 @@ qboolean CL_CheckFile( sizebuf_t *msg, resource_t *pResource ) } MSG_BeginClientCmd( msg, clc_stringcmd ); - MSG_WriteString( msg, va( "dlfile %s", filepath )); + MSG_WriteStringf( msg, "dlfile %s", filepath ); host.downloadcount++; return false; diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index ba69c4a0..81f3c46f 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -499,7 +499,7 @@ void CL_BatchResourceRequest( qboolean initialize ) if( !FBitSet( p->ucFlags, RES_REQUESTED )) { MSG_BeginClientCmd( &msg, clc_stringcmd ); - MSG_WriteString( &msg, va( "dlfile !MD5%s", MD5_Print( p->rgucMD5_hash ) ) ); + MSG_WriteStringf( &msg, "dlfile !MD5%s", MD5_Print( p->rgucMD5_hash ));; SetBits( p->ucFlags, RES_REQUESTED ); } break; @@ -1607,7 +1607,7 @@ void CL_RegisterResources( sizebuf_t *msg ) // done with all resources, issue prespawn command. // Include server count in case server disconnects and changes level during d/l MSG_BeginClientCmd( msg, clc_stringcmd ); - MSG_WriteString( msg, va( "spawn %i", cl.servercount )); + MSG_WriteStringf( msg, "spawn %i", cl.servercount ); } } else @@ -3078,7 +3078,7 @@ void CL_LegacyPrecache_f( void ) // done with all resources, issue prespawn command. // Include server count in case server disconnects and changes level during d/l MSG_BeginClientCmd( &cls.netchan.message, clc_stringcmd ); - MSG_WriteString( &cls.netchan.message, va( "begin %i", spawncount )); + MSG_WriteStringf( &cls.netchan.message, "begin %i", spawncount ); cls.signon = SIGNONS; } diff --git a/engine/server/sv_client.c b/engine/server/sv_client.c index e0b96b65..8d1cfcf3 100644 --- a/engine/server/sv_client.c +++ b/engine/server/sv_client.c @@ -1420,7 +1420,7 @@ void SV_PutClientInServer( sv_client_t *cl ) if( svgame.globals->cdAudioTrack ) { MSG_BeginServerCmd( &msg, svc_stufftext ); - MSG_WriteString( &msg, va( "cd loop %3d\n", svgame.globals->cdAudioTrack )); + MSG_WriteStringf( &msg, "cd loop %3d\n", svgame.globals->cdAudioTrack ); svgame.globals->cdAudioTrack = 0; } @@ -1660,7 +1660,7 @@ static qboolean SV_New_f( sv_client_t *cl ) // server info string MSG_BeginServerCmd( &msg, svc_stufftext ); - MSG_WriteString( &msg, va( "fullserverinfo \"%s\"\n", SV_Serverinfo( ))); + MSG_WriteStringf( &msg, "fullserverinfo \"%s\"\n", SV_Serverinfo( )); // collect the info about all the players and send to me for( i = 0, cur = svs.clients; i < svs.maxclients; i++, cur++ ) @@ -2740,15 +2740,15 @@ static void SV_EntSendVars( sv_client_t *cl, edict_t *ent ) return; MSG_WriteByte( &cl->netchan.message, svc_stufftext ); - MSG_WriteString( &cl->netchan.message, va( "set ent_last_name \"%s\"\n", STRING( ent->v.targetname ) )); + MSG_WriteStringf( &cl->netchan.message, "set ent_last_name \"%s\"\n", STRING( ent->v.targetname )); MSG_WriteByte( &cl->netchan.message, svc_stufftext ); - MSG_WriteString( &cl->netchan.message, va( "set ent_last_num %i\n", NUM_FOR_EDICT( ent ) )); + MSG_WriteStringf( &cl->netchan.message, "set ent_last_num %i\n", NUM_FOR_EDICT( ent )); MSG_WriteByte( &cl->netchan.message, svc_stufftext ); - MSG_WriteString( &cl->netchan.message, va( "set ent_last_inst !%i_%i\n", NUM_FOR_EDICT( ent ), ent->serialnumber )); + MSG_WriteStringf( &cl->netchan.message, "set ent_last_inst !%i_%i\n", NUM_FOR_EDICT( ent ), ent->serialnumber ); MSG_WriteByte( &cl->netchan.message, svc_stufftext ); - MSG_WriteString( &cl->netchan.message, va( "set ent_last_origin \"%f %f %f\"\n", ent->v.origin[0], ent->v.origin[1], ent->v.origin[2])); + MSG_WriteStringf( &cl->netchan.message, "set ent_last_origin \"%f %f %f\"\n", ent->v.origin[0], ent->v.origin[1], ent->v.origin[2] ); MSG_WriteByte( &cl->netchan.message, svc_stufftext ); - MSG_WriteString( &cl->netchan.message, va( "set ent_last_class \"%s\"\n", STRING( ent->v.classname ))); + MSG_WriteStringf( &cl->netchan.message, "set ent_last_class \"%s\"\n", STRING( ent->v.classname )); MSG_WriteByte( &cl->netchan.message, svc_stufftext ); MSG_WriteString( &cl->netchan.message, "ent_getvars_cb\n" ); // why do we need this? } diff --git a/engine/server/sv_custom.c b/engine/server/sv_custom.c index ed65820e..cb034efb 100644 --- a/engine/server/sv_custom.c +++ b/engine/server/sv_custom.c @@ -304,7 +304,7 @@ qboolean SV_CheckFile( sizebuf_t *msg, const char *filename ) return true; MSG_BeginServerCmd( msg, svc_stufftext ); - MSG_WriteString( msg, va( "upload \"!MD5%s\"\n", MD5_Print( p.rgucMD5_hash ))); + MSG_WriteStringf( msg, "upload \"!MD5%s\"\n", MD5_Print( p.rgucMD5_hash )); return false; } diff --git a/engine/server/sv_game.c b/engine/server/sv_game.c index 0f3f85c7..9661a3d6 100644 --- a/engine/server/sv_game.c +++ b/engine/server/sv_game.c @@ -2208,7 +2208,7 @@ SV_StartMusic void SV_StartMusic( const char *curtrack, const char *looptrack, int position ) { MSG_BeginServerCmd( &sv.multicast, svc_stufftext ); - MSG_WriteString( &sv.multicast, va( "music \"%s\" \"%s\" %d\n", curtrack, looptrack, position )); + MSG_WriteStringf( &sv.multicast, "music \"%s\" \"%s\" %d\n", curtrack, looptrack, position ); SV_Multicast( MSG_ALL, NULL, NULL, false, false ); } diff --git a/engine/server/sv_save.c b/engine/server/sv_save.c index 2c9da0cf..006e4875 100644 --- a/engine/server/sv_save.c +++ b/engine/server/sv_save.c @@ -1389,7 +1389,7 @@ static void LoadClientState( SAVERESTOREDATA *pSaveData, const char *level, qboo { // NOTE: music is automatically goes across transition, never restore it on changelevel MSG_BeginServerCmd( &sv.signon, svc_stufftext ); - MSG_WriteString( &sv.signon, va( "music \"%s\" \"%s\" %i\n", header.introTrack, header.mainTrack, header.trackPosition )); + MSG_WriteStringf( &sv.signon, "music \"%s\" \"%s\" %i\n", header.introTrack, header.mainTrack, header.trackPosition ); } // don't go camera across the levels