[quake3-commits] r1961 - in trunk/code: qcommon server sys

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed May 4 11:39:35 EDT 2011


Author: thilo
Date: 2011-05-04 11:39:35 -0400 (Wed, 04 May 2011)
New Revision: 1961

Modified:
   trunk/code/qcommon/q_shared.h
   trunk/code/server/sv_game.c
   trunk/code/sys/sys_unix.c
   trunk/code/sys/sys_win32.c
Log:
- Add HOMEPATH default name define to q_shared.c, patch by uZu (#4973)
- Reverted change from (#4972) and implemented the other suggestion to be consistent with cl_cgame.c and cl_ui.c


Modified: trunk/code/qcommon/q_shared.h
===================================================================
--- trunk/code/qcommon/q_shared.h	2011-05-04 14:51:56 UTC (rev 1960)
+++ trunk/code/qcommon/q_shared.h	2011-05-04 15:39:35 UTC (rev 1961)
@@ -34,6 +34,9 @@
   #define GAMENAME_FOR_MASTER		"iofoo3"		// must NOT contain whitespaces
   #define HEARTBEAT_FOR_MASTER		GAMENAME_FOR_MASTER
   #define FLATLINE_FOR_MASTER		GAMENAME_FOR_MASTER "dead"
+  #define HOMEPATH_NAME_UNIX		".foo"
+  #define HOMEPATH_NAME_WIN		"FooBar"
+  #define HOMEPATH_NAME_MACOSX		HOMEPATH_NAME_WIN
 #else
   #define PRODUCT_NAME			"ioq3"
   #define BASEGAME			"baseq3"
@@ -42,6 +45,9 @@
   #define GAMENAME_FOR_MASTER		"Quake3Arena"
   #define HEARTBEAT_FOR_MASTER		"QuakeArena-1"
   #define FLATLINE_FOR_MASTER		HEARTBEAT_FOR_MASTER
+  #define HOMEPATH_NAME_UNIX		".q3a"
+  #define HOMEPATH_NAME_WIN		"Quake3"
+  #define HOMEPATH_NAME_MACOSX		HOMEPATH_NAME_WIN
 #endif
 
 #define BASETA				"missionpack"

Modified: trunk/code/server/sv_game.c
===================================================================
--- trunk/code/server/sv_game.c	2011-05-04 14:51:56 UTC (rev 1960)
+++ trunk/code/server/sv_game.c	2011-05-04 15:39:35 UTC (rev 1961)
@@ -27,14 +27,6 @@
 
 botlib_export_t	*botlib_export;
 
-void SV_GameError( const char *string ) {
-	Com_Error( ERR_DROP, "%s", string );
-}
-
-void SV_GamePrint( const char *string ) {
-	Com_Printf( "%s", string );
-}
-
 // these functions must be used instead of pointer arithmetic, because
 // the game allocates gentities with private information after the server shared part
 int	SV_NumForGentity( sharedEntity_t *ent ) {
@@ -300,10 +292,10 @@
 intptr_t SV_GameSystemCalls( intptr_t *args ) {
 	switch( args[0] ) {
 	case G_PRINT:
-		SV_GamePrintf((const char*) VMA(1));
+		Com_Printf( "%s", (const char*)VMA(1) );
 		return 0;
 	case G_ERROR:
-		SV_GameError((const char*) VMA(1));
+		Com_Error( ERR_DROP, "%s", (const char*)VMA(1) );
 		return 0;
 	case G_MILLISECONDS:
 		return Sys_Milliseconds();

Modified: trunk/code/sys/sys_unix.c
===================================================================
--- trunk/code/sys/sys_unix.c	2011-05-04 14:51:56 UTC (rev 1960)
+++ trunk/code/sys/sys_unix.c	2011-05-04 15:39:35 UTC (rev 1961)
@@ -63,12 +63,12 @@
 			if(com_homepath->string[0])
 				Q_strcat(homePath, sizeof(homePath), com_homepath->string);
 			else
-				Q_strcat(homePath, sizeof(homePath), "Quake3");
+				Q_strcat(homePath, sizeof(homePath), HOMEPATH_NAME_MACOSX);
 #else
 			if(com_homepath->string[0])
 				Q_strcat(homePath, sizeof(homePath), com_homepath->string);
 			else
-				Q_strcat(homePath, sizeof(homePath), ".q3a");
+				Q_strcat(homePath, sizeof(homePath), HOMEPATH_NAME_UNIX);
 #endif
 		}
 	}

Modified: trunk/code/sys/sys_win32.c
===================================================================
--- trunk/code/sys/sys_win32.c	2011-05-04 14:51:56 UTC (rev 1960)
+++ trunk/code/sys/sys_win32.c	2011-05-04 15:39:35 UTC (rev 1961)
@@ -94,7 +94,7 @@
 		if(com_homepath->string[0])
 			Q_strcat(homePath, sizeof(homePath), com_homepath->string);
 		else
-			Q_strcat(homePath, sizeof(homePath), "Quake3");
+			Q_strcat(homePath, sizeof(homePath), HOMEPATH_NAME_WIN);
 
 		FreeLibrary(shfolder);
 	}



More information about the quake3-commits mailing list