[quake3-commits] r2280 - in trunk/code: cgame game q3_ui ui

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Jun 19 10:52:22 EDT 2012


Author: ztm
Date: 2012-06-19 10:52:22 -0400 (Tue, 19 Jun 2012)
New Revision: 2280

Modified:
   trunk/code/cgame/cg_main.c
   trunk/code/game/g_cmds.c
   trunk/code/game/g_main.c
   trunk/code/q3_ui/ui_atoms.c
   trunk/code/ui/ui_atoms.c
   trunk/code/ui/ui_main.c
Log:
remove a bunch of superfluous formatting calls

>From /dev/humancontroller.

Modified: trunk/code/cgame/cg_main.c
===================================================================
--- trunk/code/cgame/cg_main.c	2012-06-19 14:51:02 UTC (rev 2279)
+++ trunk/code/cgame/cg_main.c	2012-06-19 14:52:22 UTC (rev 2280)
@@ -446,7 +446,7 @@
 	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 @@
 	Q_vsnprintf (text, sizeof(text), msg, argptr);
 	va_end (argptr);
 
-	CG_Printf ("%s", text);
+	trap_Print( text );
 }
 
 /*

Modified: trunk/code/game/g_cmds.c
===================================================================
--- trunk/code/game/g_cmds.c	2012-06-19 14:51:02 UTC (rev 2279)
+++ trunk/code/game/g_cmds.c	2012-06-19 14:52:22 UTC (rev 2280)
@@ -110,11 +110,11 @@
 */
 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 @@
 	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;
 	}
 

Modified: trunk/code/game/g_main.c
===================================================================
--- trunk/code/game/g_main.c	2012-06-19 14:51:02 UTC (rev 2279)
+++ trunk/code/game/g_main.c	2012-06-19 14:52:22 UTC (rev 2280)
@@ -545,7 +545,7 @@
 	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 @@
 	Q_vsnprintf (text, sizeof(text), msg, argptr);
 	va_end (argptr);
 
-	G_Printf ("%s", text);
+	trap_Print( text );
 }
 
 /*

Modified: trunk/code/q3_ui/ui_atoms.c
===================================================================
--- trunk/code/q3_ui/ui_atoms.c	2012-06-19 14:51:02 UTC (rev 2279)
+++ trunk/code/q3_ui/ui_atoms.c	2012-06-19 14:52:22 UTC (rev 2280)
@@ -38,7 +38,7 @@
 	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 @@
 	Q_vsnprintf (text, sizeof(text), msg, argptr);
 	va_end (argptr);
 
-	trap_Print( va("%s", text) );
+	trap_Print( text );
 }
 
 /*

Modified: trunk/code/ui/ui_atoms.c
===================================================================
--- trunk/code/ui/ui_atoms.c	2012-06-19 14:51:02 UTC (rev 2279)
+++ trunk/code/ui/ui_atoms.c	2012-06-19 14:52:22 UTC (rev 2280)
@@ -37,7 +37,7 @@
 	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 @@
 	Q_vsnprintf (text, sizeof(text), msg, argptr);
 	va_end (argptr);
 
-	trap_Print( va("%s", text) );
+	trap_Print( text );
 }
 
 qboolean newUI = qfalse;

Modified: trunk/code/ui/ui_main.c
===================================================================
--- trunk/code/ui/ui_main.c	2012-06-19 14:51:02 UTC (rev 2279)
+++ trunk/code/ui/ui_main.c	2012-06-19 14:52:22 UTC (rev 2280)
@@ -931,7 +931,7 @@
 		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 @@
 	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 @@
 			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 @@
 	}
 
 	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);



More information about the quake3-commits mailing list