[quake3-commits] r1777 - trunk/code/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Feb 28 03:58:03 EST 2010


Author: ludwig
Date: 2010-02-28 03:58:03 -0500 (Sun, 28 Feb 2010)
New Revision: 1777

Modified:
   trunk/code/client/cl_main.c
   trunk/code/client/cl_ui.c
Log:
enable (dummy) cdkey calls in standalone mode to prevents mods from crashing

Modified: trunk/code/client/cl_main.c
===================================================================
--- trunk/code/client/cl_main.c	2010-02-28 08:56:54 UTC (rev 1776)
+++ trunk/code/client/cl_main.c	2010-02-28 08:58:03 UTC (rev 1777)
@@ -4162,13 +4162,15 @@
 	Sys_ShowIP();
 }
 
-#ifndef STANDALONE
 /*
 =================
 bool CL_CDKeyValidate
 =================
 */
 qboolean CL_CDKeyValidate( const char *key, const char *checksum ) {
+#ifdef STANDALONE
+	return qtrue;
+#else
 	char	ch;
 	byte	sum;
 	char	chs[3];
@@ -4225,5 +4227,5 @@
 	}
 
 	return qfalse;
+#endif
 }
-#endif

Modified: trunk/code/client/cl_ui.c
===================================================================
--- trunk/code/client/cl_ui.c	2010-02-28 08:56:54 UTC (rev 1776)
+++ trunk/code/client/cl_ui.c	2010-02-28 08:58:03 UTC (rev 1777)
@@ -625,8 +625,8 @@
 CLUI_GetCDKey
 ====================
 */
+static void CLUI_GetCDKey( char *buf, int buflen ) {
 #ifndef STANDALONE
-static void CLUI_GetCDKey( char *buf, int buflen ) {
 	cvar_t	*fs;
 	fs = Cvar_Get ("fs_game", "", CVAR_INIT|CVAR_SYSTEMINFO );
 	if (UI_usesUniqueCDKey() && fs && fs->string[0] != 0) {
@@ -636,6 +636,9 @@
 		Com_Memcpy( buf, cl_cdkey, 16);
 		buf[16] = 0;
 	}
+#else
+	*buf = 0;
+#endif
 }
 
 
@@ -644,6 +647,7 @@
 CLUI_SetCDKey
 ====================
 */
+#ifndef STANDALONE
 static void CLUI_SetCDKey( char *buf ) {
 	cvar_t	*fs;
 	fs = Cvar_Get ("fs_game", "", CVAR_INIT|CVAR_SYSTEMINFO );
@@ -963,15 +967,15 @@
 	case UI_MEMORY_REMAINING:
 		return Hunk_MemoryRemaining();
 
-#ifndef STANDALONE
 	case UI_GET_CDKEY:
 		CLUI_GetCDKey( VMA(1), args[2] );
 		return 0;
 
 	case UI_SET_CDKEY:
+#ifndef STANDALONE
 		CLUI_SetCDKey( VMA(1) );
+#endif
 		return 0;
-#endif
 	
 	case UI_SET_PBCLSTATUS:
 		return 0;	
@@ -1053,11 +1057,8 @@
 		re.RemapShader( VMA(1), VMA(2), VMA(3) );
 		return 0;
 
-#ifndef STANDALONE
 	case UI_VERIFY_CDKEY:
 		return CL_CDKeyValidate(VMA(1), VMA(2));
-#endif
-
 		
 	default:
 		Com_Error( ERR_DROP, "Bad UI system trap: %ld", (long int) args[0] );



More information about the quake3-commits mailing list