diff --git a/code/cgame/cg_main.c b/code/cgame/cg_main.c index 43a44f06..15b32ad3 100644 --- a/code/cgame/cg_main.c +++ b/code/cgame/cg_main.c @@ -446,7 +446,7 @@ void QDECL Com_Error( int level, const char *error, ... ) { Q_vsnprintf (text, sizeof(text), error, argptr); va_end (argptr); - CG_Error( "%s", text); + trap_Error( text ); } void QDECL Com_Printf( const char *msg, ... ) { @@ -457,7 +457,7 @@ void QDECL Com_Printf( const char *msg, ... ) { Q_vsnprintf (text, sizeof(text), msg, argptr); va_end (argptr); - CG_Printf ("%s", text); + trap_Print( text ); } /* diff --git a/code/game/g_cmds.c b/code/game/g_cmds.c index e1147e86..79f4d6bc 100644 --- a/code/game/g_cmds.c +++ b/code/game/g_cmds.c @@ -110,11 +110,11 @@ CheatsOk */ qboolean CheatsOk( gentity_t *ent ) { if ( !g_cheats.integer ) { - trap_SendServerCommand( ent-g_entities, va("print \"Cheats are not enabled on this server.\n\"")); + trap_SendServerCommand( ent-g_entities, "print \"Cheats are not enabled on this server.\n\""); return qfalse; } if ( ent->health <= 0 ) { - trap_SendServerCommand( ent-g_entities, va("print \"You must be alive to use this command.\n\"")); + trap_SendServerCommand( ent-g_entities, "print \"You must be alive to use this command.\n\""); return qfalse; } return qtrue; @@ -1536,11 +1536,11 @@ void Cmd_SetViewpos_f( gentity_t *ent ) { int i; if ( !g_cheats.integer ) { - trap_SendServerCommand( ent-g_entities, va("print \"Cheats are not enabled on this server.\n\"")); + trap_SendServerCommand( ent-g_entities, "print \"Cheats are not enabled on this server.\n\""); return; } if ( trap_Argc() != 5 ) { - trap_SendServerCommand( ent-g_entities, va("print \"usage: setviewpos x y z yaw\n\"")); + trap_SendServerCommand( ent-g_entities, "print \"usage: setviewpos x y z yaw\n\""); return; } diff --git a/code/game/g_main.c b/code/game/g_main.c index 4d3cf28a..3c464214 100644 --- a/code/game/g_main.c +++ b/code/game/g_main.c @@ -545,7 +545,7 @@ void QDECL Com_Error ( int level, const char *error, ... ) { Q_vsnprintf (text, sizeof(text), error, argptr); va_end (argptr); - G_Error( "%s", text); + trap_Error( text ); } void QDECL Com_Printf( const char *msg, ... ) { @@ -556,7 +556,7 @@ void QDECL Com_Printf( const char *msg, ... ) { Q_vsnprintf (text, sizeof(text), msg, argptr); va_end (argptr); - G_Printf ("%s", text); + trap_Print( text ); } /* diff --git a/code/q3_ui/ui_atoms.c b/code/q3_ui/ui_atoms.c index 753f75a5..020a33e5 100644 --- a/code/q3_ui/ui_atoms.c +++ b/code/q3_ui/ui_atoms.c @@ -38,7 +38,7 @@ void QDECL Com_Error( int level, const char *error, ... ) { Q_vsnprintf (text, sizeof(text), error, argptr); va_end (argptr); - trap_Error( va("%s", text) ); + trap_Error( text ); } void QDECL Com_Printf( const char *msg, ... ) { @@ -49,7 +49,7 @@ void QDECL Com_Printf( const char *msg, ... ) { Q_vsnprintf (text, sizeof(text), msg, argptr); va_end (argptr); - trap_Print( va("%s", text) ); + trap_Print( text ); } /* diff --git a/code/ui/ui_atoms.c b/code/ui/ui_atoms.c index 6faa7931..16ce6f2f 100644 --- a/code/ui/ui_atoms.c +++ b/code/ui/ui_atoms.c @@ -37,7 +37,7 @@ void QDECL Com_Error( int level, const char *error, ... ) { Q_vsnprintf (text, sizeof(text), error, argptr); va_end (argptr); - trap_Error( va("%s", text) ); + trap_Error( text ); } void QDECL Com_Printf( const char *msg, ... ) { @@ -48,7 +48,7 @@ void QDECL Com_Printf( const char *msg, ... ) { Q_vsnprintf (text, sizeof(text), msg, argptr); va_end (argptr); - trap_Print( va("%s", text) ); + trap_Print( text ); } qboolean newUI = qfalse; diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c index 94100ae6..7b8f0c8f 100644 --- a/code/ui/ui_main.c +++ b/code/ui/ui_main.c @@ -931,7 +931,7 @@ void UI_LoadMenus(const char *menuFile, qboolean reset) { Com_Printf( S_COLOR_YELLOW "menu file not found: %s, using default\n", menuFile ); handle = trap_PC_LoadSource( "ui/menus.txt" ); if (!handle) { - trap_Error( va( S_COLOR_RED "default menu file not found: ui/menus.txt, unable to continue!" ) ); + trap_Error( S_COLOR_RED "default menu file not found: ui/menus.txt, unable to continue!" ); } } @@ -4472,7 +4472,7 @@ static void UI_FeederSelection(float feederID, int index) { UI_SelectedHead(index, &actual); index = actual; if (index >= 0 && index < uiInfo.characterCount) { - trap_Cvar_Set( "team_model", va("%s", uiInfo.characterList[index].base)); + trap_Cvar_Set( "team_model", uiInfo.characterList[index].base); trap_Cvar_Set( "team_headmodel", va("*%s", uiInfo.characterList[index].name)); updateModel = qtrue; } @@ -4639,11 +4639,11 @@ static qboolean Character_Parse(char **p) { uiInfo.characterList[uiInfo.characterCount].imageName = String_Alloc(va("models/players/heads/%s/icon_default.tga", uiInfo.characterList[uiInfo.characterCount].name)); if (tempStr && (!Q_stricmp(tempStr, "female"))) { - uiInfo.characterList[uiInfo.characterCount].base = String_Alloc(va("Janet")); + uiInfo.characterList[uiInfo.characterCount].base = String_Alloc("Janet"); } else if (tempStr && (!Q_stricmp(tempStr, "male"))) { - uiInfo.characterList[uiInfo.characterCount].base = String_Alloc(va("James")); + uiInfo.characterList[uiInfo.characterCount].base = String_Alloc("James"); } else { - uiInfo.characterList[uiInfo.characterCount].base = String_Alloc(va("%s",tempStr)); + uiInfo.characterList[uiInfo.characterCount].base = String_Alloc(tempStr); } Com_Printf("Loaded %s character %s.\n", uiInfo.characterList[uiInfo.characterCount].base, uiInfo.characterList[uiInfo.characterCount].name); @@ -5554,7 +5554,7 @@ void UI_DrawConnectScreen( qboolean overlay ) { } if (!Q_stricmp(cstate.servername,"localhost")) { - Text_PaintCenter(centerPoint, yStart + 48, scale, colorWhite, va("Starting up..."), ITEM_TEXTSTYLE_SHADOWEDMORE); + Text_PaintCenter(centerPoint, yStart + 48, scale, colorWhite, "Starting up...", ITEM_TEXTSTYLE_SHADOWEDMORE); } else { strcpy(text, va("Connecting to %s", cstate.servername)); Text_PaintCenter(centerPoint, yStart + 48, scale, colorWhite,text , ITEM_TEXTSTYLE_SHADOWEDMORE);