[iortcw] 457/497: All: Add German checksums / Fix pak checks

Simon McVittie smcv at debian.org
Fri Sep 8 10:37:51 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 695092a59c7dc7ba46b157631727b406c41b893e
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date:   Fri Dec 4 11:06:55 2015 -0500

    All: Add German checksums / Fix pak checks
---
 MP/code/qcommon/files.c   | 150 ++++++++++++++++----------------
 MP/code/qcommon/qcommon.h |   2 +-
 SP/code/qcommon/files.c   | 214 +++++++++++++++++++++++++---------------------
 SP/code/qcommon/qcommon.h |   2 +-
 4 files changed, 194 insertions(+), 174 deletions(-)

diff --git a/MP/code/qcommon/files.c b/MP/code/qcommon/files.c
index 399b920..a17cdbe 100644
--- a/MP/code/qcommon/files.c
+++ b/MP/code/qcommon/files.c
@@ -3608,21 +3608,20 @@ static void FS_Startup( const char *gameName ) {
 #ifndef STANDALONE
 /*
 ===================
-FS_CheckPak0
+FS_CheckMPPaks
 
 Check whether any of the original id pak files is present,
 and start up in standalone mode, if there are none and a
 different com_basegame was set.
 Note: If you're building a game that doesn't depend on the
-RTCW media pak0.pk3, you'll want to remove this by defining
+RTCW media mp_pak0.pk3, you'll want to remove this by defining
 STANDALONE in q_shared.h
 ===================
 */
-static void FS_CheckPak0( void )
+static void FS_CheckMPPaks( void )
 {
 	searchpath_t	*path;
 	pack_t		*curpack;
-	qboolean founddemo = qfalse;
 	unsigned int foundPak = 0;
 
 	for( path = fs_searchpaths; path; path = path->next )
@@ -3634,25 +3633,18 @@ static void FS_CheckPak0( void )
 		
 		curpack = path->pack;
 
-		if(!Q_stricmpn( curpack->pakGamename, "demomain", MAX_OSPATH )
-		   && !Q_stricmpn( pakBasename, "pak0", MAX_OSPATH ))
-		{
-			if(curpack->checksum == DEMO_PAK0_CHECKSUM)
-				founddemo = qtrue;
-		}
-
-		else if(!Q_stricmpn( curpack->pakGamename, BASEGAME, MAX_OSPATH )
-			&& strlen(pakBasename) == 4 && !Q_stricmpn( pakBasename, "pak", 3 )
-			&& pakBasename[3] >= '0' && pakBasename[3] <= '0' + NUM_ID_PAKS - 1)
+		if(!Q_stricmpn( curpack->pakGamename, BASEGAME, MAX_OSPATH )
+			&& strlen(pakBasename) == 7 && !Q_stricmpn( pakBasename, "mp_pak", 6 )
+			&& pakBasename[6] >= '0' && pakBasename[6] <= '0' + NUM_MP_PAKS - 1)
 		{
-			if( curpack->checksum != pak_checksums[pakBasename[3]-'0'] )
+			if( curpack->checksum != mppak_checksums[pakBasename[6]-'0'] )
 			{
-				if(pakBasename[3] == '0')
+				if(pakBasename[6] == '0')
 				{
 					Com_Printf("\n\n"
 						"**************************************************\n"
-						"WARNING: " BASEGAME "/pak0.pk3 is present but its checksum (%u)\n"
-						"is not correct. Please re-copy pak0.pk3 from your\n"
+						"WARNING: " BASEGAME "/mp_pak0.pk3 is present but its checksum (%u)\n"
+						"is not correct. Please re-copy mp_pak0.pk3 from your\n"
 						"legitimate RTCW CDROM.\n"
 						"**************************************************\n\n\n",
 						curpack->checksum );
@@ -3661,14 +3653,14 @@ static void FS_CheckPak0( void )
 				{
 					Com_Printf("\n\n"
 						"**************************************************\n"
-						"WARNING: " BASEGAME "/pak%d.pk3 is present but its checksum (%u)\n"
+						"WARNING: " BASEGAME "/mp_pak%d.pk3 is present but its checksum (%u)\n"
 						"is not correct. Please re-install the point release\n"
 						"**************************************************\n\n\n",
-						pakBasename[3]-'0', curpack->checksum );
+						pakBasename[6]-'0', curpack->checksum );
 				}
 			}
 
-			foundPak |= 1<<(pakBasename[3]-'0');
+			foundPak |= 1<<(pakBasename[6]-'0');
 		}
 		else
 		{
@@ -3677,13 +3669,13 @@ static void FS_CheckPak0( void )
 			// Finally check whether this pak's checksum is listed because the user tried
 			// to trick us by renaming the file, and set foundPak's highest bit to indicate this case.
 			
-			for(index = 0; index < ARRAY_LEN(pak_checksums); index++)
+			for(index = 0; index < ARRAY_LEN(mppak_checksums); index++)
 			{
-				if(curpack->checksum == pak_checksums[index])
+				if(curpack->checksum == mppak_checksums[index])
 				{
 					Com_Printf("\n\n"
 						"**************************************************\n"
-						"WARNING: %s is renamed pak file %s%cpak%d.pk3\n"
+						"WARNING: %s is renamed pak file %s%cmp_pak%d.pk3\n"
 						"Running in standalone mode won't work\n"
 						"Please rename, or remove this file\n"
 						"**************************************************\n\n\n",
@@ -3704,57 +3696,40 @@ static void FS_CheckPak0( void )
 	else
 		Cvar_Set("com_standalone", "0");
 
-	if(!com_standalone->integer)
-	{
-		if(!(foundPak & 0x01))
-		{
-			if(founddemo)
-			{
-				Com_Printf( "\n\n"
-						"**************************************************\n"
-						"WARNING: It looks like you're using pak0.pk3\n"
-						"from the demo. This may work fine, but it is not\n"
-						"guaranteed or supported.\n"
-						"**************************************************\n\n\n" );
-				
-				foundPak |= 0x01;
-			}
-		}
-	}
 
-
-	if(!com_standalone->integer && (foundPak & 0x01) != 0x01)
+	if(!com_standalone->integer && (foundPak & 0x3f) != 0x3f)
 	{
 		char errorText[MAX_STRING_CHARS] = "";
 
-		if((foundPak & 0x01) != 0x01)
+		if((foundPak & 0x3f) != 0x3f)
 		{
 			Q_strcat(errorText, sizeof(errorText),
-				"\"pak0.pk3\" is missing. Please copy it "
-				"from your legitimate RTCW CDROM. ");
+				"\n\nPoint Release files are missing. Please\n"
+				"re-install the 1.41 point release.\n\n");
 		}
 
 		Com_Error(ERR_FATAL, "%s", errorText);
 	}
-	
 }
 
+
 /*
 ===================
-FS_CheckMPPaks
+FS_CheckPak0
 
 Check whether any of the original id pak files is present,
 and start up in standalone mode, if there are none and a
 different com_basegame was set.
 Note: If you're building a game that doesn't depend on the
-RTCW media mp_pak0.pk3, you'll want to remove this by defining
+RTCW media pak0.pk3, you'll want to remove this by defining
 STANDALONE in q_shared.h
 ===================
 */
-static void FS_CheckMPPaks( void )
+static void FS_CheckPak0( void )
 {
 	searchpath_t	*path;
 	pack_t		*curpack;
+	qboolean founddemo = qfalse;
 	unsigned int foundPak = 0;
 
 	for( path = fs_searchpaths; path; path = path->next )
@@ -3766,34 +3741,45 @@ static void FS_CheckMPPaks( void )
 		
 		curpack = path->pack;
 
-		if(!Q_stricmpn( curpack->pakGamename, BASEGAME, MAX_OSPATH )
-			&& strlen(pakBasename) == 7 && !Q_stricmpn( pakBasename, "mp_pak", 6 )
-			&& pakBasename[6] >= '0' && pakBasename[6] <= '0' + NUM_MP_PAKS - 1)
+		if(!Q_stricmpn( curpack->pakGamename, "demomain", MAX_OSPATH )
+			&& !Q_stricmpn( pakBasename, "pak0", MAX_OSPATH ))
 		{
-			if( curpack->checksum != mppak_checksums[pakBasename[6]-'0'] )
+			if(curpack->checksum == DEMO_PAK0_CHECKSUM)
+				founddemo = qtrue;
+		}
+
+		else if(!Q_stricmpn( curpack->pakGamename, BASEGAME, MAX_OSPATH )
+			&& strlen(pakBasename) == 4 && !Q_stricmpn( pakBasename, "pak", 3 )
+			&& pakBasename[3] >= '0' && pakBasename[3] <= '0' + NUM_ID_PAKS - 1)
+		{
+			if( curpack->checksum != pak_checksums[pakBasename[3]-'0'] )
 			{
-				if(pakBasename[6] == '0')
+				if(pakBasename[3] == '0')
 				{
 					Com_Printf("\n\n"
 						"**************************************************\n"
-						"WARNING: " BASEGAME "/mp_pak0.pk3 is present but its checksum (%u)\n"
-						"is not correct. Please re-copy mp_pak0.pk3 from your\n"
+						"WARNING: " BASEGAME "/pak0.pk3 is present but its checksum (%u)\n"
+						"is not correct. Please re-copy pak0.pk3 from your\n"
 						"legitimate RTCW CDROM.\n"
 						"**************************************************\n\n\n",
 						curpack->checksum );
+
+						Com_Error(ERR_FATAL, NULL);
 				}
+				/*
 				else
 				{
 					Com_Printf("\n\n"
 						"**************************************************\n"
-						"WARNING: " BASEGAME "/mp_pak%d.pk3 is present but its checksum (%u)\n"
+						"WARNING: " BASEGAME "/pak%d.pk3 is present but its checksum (%u)\n"
 						"is not correct. Please re-install the point release\n"
 						"**************************************************\n\n\n",
-						pakBasename[6]-'0', curpack->checksum );
+						pakBasename[3]-'0', curpack->checksum );
 				}
+				*/
 			}
 
-			foundPak |= 1<<(pakBasename[6]-'0');
+			foundPak |= 1<<(pakBasename[3]-'0');
 		}
 		else
 		{
@@ -3802,13 +3788,13 @@ static void FS_CheckMPPaks( void )
 			// Finally check whether this pak's checksum is listed because the user tried
 			// to trick us by renaming the file, and set foundPak's highest bit to indicate this case.
 			
-			for(index = 0; index < ARRAY_LEN(mppak_checksums); index++)
+			for(index = 0; index < ARRAY_LEN(pak_checksums); index++)
 			{
-				if(curpack->checksum == mppak_checksums[index])
+				if(curpack->checksum == pak_checksums[index])
 				{
 					Com_Printf("\n\n"
 						"**************************************************\n"
-						"WARNING: %s is renamed pak file %s%cmp_pak%d.pk3\n"
+						"WARNING: %s is renamed pak file %s%cpak%d.pk3\n"
 						"Running in standalone mode won't work\n"
 						"Please rename, or remove this file\n"
 						"**************************************************\n\n\n",
@@ -3818,7 +3804,6 @@ static void FS_CheckMPPaks( void )
 					foundPak |= 0x80000000;
 				}
 			}
-
 		}
 	}
 
@@ -3829,25 +3814,46 @@ static void FS_CheckMPPaks( void )
 	else
 		Cvar_Set("com_standalone", "0");
 
+	if(!com_standalone->integer)
+	{
+		if(!(foundPak & 0x01))
+		{
+			if(founddemo)
+			{
+				Com_Printf( "\n\n"
+					"**************************************************\n"
+					"WARNING: It looks like you're using pak0.pk3\n"
+					"from the demo. This may work fine, but it is not\n"
+					"guaranteed or supported.\n"
+					"**************************************************\n\n\n" );
+				
+				foundPak |= 0x01;
+			}
+		}
+	}
 
-	if(!com_standalone->integer && (foundPak & 0x3f) != 0x3f)
+
+	if(!com_standalone->integer && (foundPak & 0x01) != 0x01)
 	{
 		char errorText[MAX_STRING_CHARS] = "";
 
-		if((foundPak & 0x3f) != 0x3f)
+		if((foundPak & 0x01) != 0x01)
 		{
 			Q_strcat(errorText, sizeof(errorText),
-				"Point Release files are missing. Please "
-				"re-install the 1.41 point release. ");
+				"\n\n\"pak0.pk3\" is missing. Please copy it\n"
+				"from your legitimate RTCW CDROM.\n\n");
 		}
 
 		Q_strcat(errorText, sizeof(errorText),
-			va("Also check that your iortcw executable is in "
-			"the correct place and that every file "
-			"in the \"%s\" directory is present and readable", BASEGAME));
+			va("Also check that your iortcw executable is in\n"
+				"the correct place and that every file\n"
+				"in the \"%s\" directory is present and readable.\n\n", BASEGAME));
 
 		Com_Error(ERR_FATAL, "%s", errorText);
 	}
+
+	if(!founddemo)
+		FS_CheckMPPaks();
 	
 }
 #endif
@@ -4514,7 +4520,6 @@ void FS_InitFilesystem( void ) {
 
 #ifndef STANDALONE
 	FS_CheckPak0( );
-	FS_CheckMPPaks( );
 #endif
 
 #ifndef UPDATE_SERVER
@@ -4553,7 +4558,6 @@ void FS_Restart( int checksumFeed ) {
 
 #ifndef STANDALONE
 	FS_CheckPak0( );
-	FS_CheckMPPaks( );
 #endif
 
 	// if we can't find default.cfg, assume that the paths are
diff --git a/MP/code/qcommon/qcommon.h b/MP/code/qcommon/qcommon.h
index 2ba91bb..0fdfeea 100644
--- a/MP/code/qcommon/qcommon.h
+++ b/MP/code/qcommon/qcommon.h
@@ -656,7 +656,7 @@ issues.
 #define FS_CGAME_REF    0x04
 // #define FS_QAGAME_REF   0x08
 // number of id paks that will never be autodownloaded from main
-#define NUM_ID_PAKS     10
+#define NUM_ID_PAKS	1
 #define NUM_MP_PAKS	6
 
 #define MAX_FILE_HANDLES    64
diff --git a/SP/code/qcommon/files.c b/SP/code/qcommon/files.c
index 66dc134..e75afdb 100644
--- a/SP/code/qcommon/files.c
+++ b/SP/code/qcommon/files.c
@@ -199,6 +199,14 @@ static const unsigned int fr_sppak_checksums[] = {
 	4131017020u
 };
 
+static const unsigned int gm_sppak_checksums[] = {
+	3078133571u,
+	285968110,
+	2694180987,
+	// sp_pak4.pk3 from GOTY edition
+	4131017020u
+};
+
 static const unsigned int it_sppak_checksums[] = {
 	3826630960u,
 	3033901371u,
@@ -3623,21 +3631,20 @@ static void FS_Startup( const char *gameName )
 #ifndef STANDALONE
 /*
 ===================
-FS_CheckPak0
+FS_CheckSPPaks
 
 Check whether any of the original id pak files is present,
 and start up in standalone mode, if there are none and a
 different com_basegame was set.
 Note: If you're building a game that doesn't depend on the
-RTCW media pak0.pk3, you'll want to remove this by defining
+Q3 media pak0.pk3, you'll want to remove this by defining
 STANDALONE in q_shared.h
 ===================
 */
-static void FS_CheckPak0( void )
+static void FS_CheckSPPaks( void )
 {
 	searchpath_t	*path;
 	pack_t		*curpack;
-	qboolean founddemo = qfalse;
 	unsigned int foundPak = 0;
 
 	for( path = fs_searchpaths; path; path = path->next )
@@ -3649,41 +3656,38 @@ static void FS_CheckPak0( void )
 
 		curpack = path->pack;
 
-		if(!Q_stricmpn( curpack->pakGamename, "demomain", MAX_OSPATH )
-				&& !Q_stricmpn( pakBasename, "pak0", MAX_OSPATH ))
-		{
-			if(curpack->checksum == DEMO_PAK0_CHECKSUM)
-				founddemo = qtrue;
-		}
-
-		else if(!Q_stricmpn( curpack->pakGamename, BASEGAME, MAX_OSPATH )
-				&& strlen(pakBasename) == 4 && !Q_stricmpn( pakBasename, "pak", 3 )
-				&& pakBasename[3] >= '0' && pakBasename[3] <= '0' + NUM_ID_PAKS - 1)
+		if(!Q_stricmpn( curpack->pakGamename, BASEGAME, MAX_OSPATH )
+				&& strlen(pakBasename) == 7 && !Q_stricmpn( pakBasename, "sp_pak", 6 )
+				&& pakBasename[6] >= '1' && pakBasename[6] <= '1' + NUM_SP_PAKS - 1)
 		{
-			if( curpack->checksum != pak_checksums[pakBasename[3]-'0'] )
+			if( curpack->checksum != en_sppak_checksums[pakBasename[6]-'1'] &&
+				curpack->checksum != fr_sppak_checksums[pakBasename[6]-'1'] &&
+				curpack->checksum != gm_sppak_checksums[pakBasename[6]-'1'] &&
+				curpack->checksum != it_sppak_checksums[pakBasename[6]-'1'] &&
+				curpack->checksum != sp_sppak_checksums[pakBasename[6]-'1'] )
 			{
-				if(pakBasename[3] == '0')
+				if(pakBasename[6] == '1')
 				{
 					Com_Printf("\n\n"
-							"**************************************************\n"
-							"WARNING: " BASEGAME "/pak0.pk3 is present but its checksum (%u)\n"
-							"is not correct. Please re-copy pak0.pk3 from your\n"
-							"legitimate RTCW CDROM.\n"
-							"**************************************************\n\n\n",
-							curpack->checksum );
+						"**************************************************\n"
+						"WARNING: " BASEGAME "/sp_pak1.pk3 is present but its checksum (%u)\n"
+						"is not correct. Please re-copy sp_pak1.pk3 from your\n"
+						"legitimate RTCW CDROM.\n"
+						"**************************************************\n\n\n",
+						curpack->checksum );
 				}
 				else
 				{
 					Com_Printf("\n\n"
-							"**************************************************\n"
-							"WARNING: " BASEGAME "/pak%d.pk3 is present but its checksum (%u)\n"
-							"is not correct. Please re-install the point release\n"
-							"**************************************************\n\n\n",
-							pakBasename[3]-'0', curpack->checksum );
+						"**************************************************\n"
+						"WARNING: " BASEGAME "/sp_pak%d.pk3 is present but its checksum (%u)\n"
+						"is not correct. Please re-install the point release\n"
+						"**************************************************\n\n\n",
+						pakBasename[6]-'0', curpack->checksum );
 				}
 			}
 
-			foundPak |= 1<<(pakBasename[3]-'0');
+			foundPak |= 1<<(pakBasename[6]-'1');
 		}
 		else
 		{
@@ -3692,17 +3696,21 @@ static void FS_CheckPak0( void )
 			// Finally check whether this pak's checksum is listed because the user tried
 			// to trick us by renaming the file, and set foundPak's highest bit to indicate this case.
 
-			for(index = 0; index < ARRAY_LEN(pak_checksums); index++)
+			for(index = 0; index < ARRAY_LEN( en_sppak_checksums ); index++)
 			{
-				if(curpack->checksum == pak_checksums[index])
+				if( curpack->checksum == en_sppak_checksums[index] ||
+					curpack->checksum == fr_sppak_checksums[index] ||
+					curpack->checksum == gm_sppak_checksums[index] ||
+					curpack->checksum == it_sppak_checksums[index] ||
+					curpack->checksum == sp_sppak_checksums[index] )
 				{
 					Com_Printf("\n\n"
-							"**************************************************\n"
-							"WARNING: %s is renamed pak file %s%cpak%d.pk3\n"
-							"Running in standalone mode won't work\n"
-							"Please rename, or remove this file\n"
-							"**************************************************\n\n\n",
-							curpack->pakFilename, BASEGAME, PATH_SEP, index);
+						"**************************************************\n"
+						"WARNING: %s is renamed pak file %s%csp_pak%d.pk3\n"
+						"Running in standalone mode won't work\n"
+						"Please rename, or remove this file\n"
+						"**************************************************\n\n\n",
+						curpack->pakFilename, BASEGAME, PATH_SEP, index + 1 );
 
 
 					foundPak |= 0x80000000;
@@ -3718,57 +3726,40 @@ static void FS_CheckPak0( void )
 	else
 		Cvar_Set("com_standalone", "0");
 
-	if(!com_standalone->integer)
-	{
-		if(!(foundPak & 0x01))
-		{
-			if(founddemo)
-			{
-				Com_Printf( "\n\n"
-						"**************************************************\n"
-						"WARNING: It looks like you're using pak0.pk3\n"
-						"from the demo. This may work fine, but it is not\n"
-						"guaranteed or supported.\n"
-						"**************************************************\n\n\n" );
-
-				foundPak |= 0x01;
-			}
-		}
-	}
-
 
-	if(!com_standalone->integer && (foundPak & 0x01) != 0x01)
+	if(!com_standalone->integer && (foundPak & 0xf) != 0xf)
 	{
 		char errorText[MAX_STRING_CHARS] = "";
 
-		if((foundPak & 0x01) != 0x01)
+		if((foundPak & 0xf) != 0xf)
 		{
 			Q_strcat(errorText, sizeof(errorText),
-					"\"pak0.pk3\" is missing. Please copy it "
-					"from your legitimate RTCW CDROM. ");
+				"\n\nPoint Release files are missing. Please\n"
+				"re-install the 1.41 point release.\n\n");
 		}
 
 		Com_Error(ERR_FATAL, "%s", errorText);
 	}
-
 }
 
+
 /*
 ===================
-FS_CheckSPPaks
+FS_CheckPak0
 
 Check whether any of the original id pak files is present,
 and start up in standalone mode, if there are none and a
 different com_basegame was set.
 Note: If you're building a game that doesn't depend on the
-Q3 media pak0.pk3, you'll want to remove this by defining
+RTCW media pak0.pk3, you'll want to remove this by defining
 STANDALONE in q_shared.h
 ===================
 */
-static void FS_CheckSPPaks( void )
+static void FS_CheckPak0( void )
 {
 	searchpath_t	*path;
 	pack_t		*curpack;
+	qboolean founddemo = qfalse;
 	unsigned int foundPak = 0;
 
 	for( path = fs_searchpaths; path; path = path->next )
@@ -3780,37 +3771,45 @@ static void FS_CheckSPPaks( void )
 
 		curpack = path->pack;
 
-		if(!Q_stricmpn( curpack->pakGamename, BASEGAME, MAX_OSPATH )
-				&& strlen(pakBasename) == 7 && !Q_stricmpn( pakBasename, "sp_pak", 6 )
-				&& pakBasename[6] >= '1' && pakBasename[6] <= '1' + NUM_SP_PAKS - 1)
+		if(!Q_stricmpn( curpack->pakGamename, "demomain", MAX_OSPATH )
+			&& !Q_stricmpn( pakBasename, "pak0", MAX_OSPATH ))
 		{
-			if( curpack->checksum != en_sppak_checksums[pakBasename[6]-'1'] &&
-				curpack->checksum != fr_sppak_checksums[pakBasename[6]-'1'] &&
-				curpack->checksum != it_sppak_checksums[pakBasename[6]-'1'] &&
-				curpack->checksum != sp_sppak_checksums[pakBasename[6]-'1'] )
+			if(curpack->checksum == DEMO_PAK0_CHECKSUM)
+				founddemo = qtrue;
+		}
+
+		else if(!Q_stricmpn( curpack->pakGamename, BASEGAME, MAX_OSPATH )
+				&& strlen(pakBasename) == 4 && !Q_stricmpn( pakBasename, "pak", 3 )
+				&& pakBasename[3] >= '0' && pakBasename[3] <= '0' + NUM_ID_PAKS - 1)
+		{
+			if( curpack->checksum != pak_checksums[pakBasename[3]-'0'] )
 			{
-				if(pakBasename[6] == '1')
+				if(pakBasename[3] == '0')
 				{
 					Com_Printf("\n\n"
-							"**************************************************\n"
-							"WARNING: " BASEGAME "/sp_pak1.pk3 is present but its checksum (%u)\n"
-							"is not correct. Please re-copy sp_pak1.pk3 from your\n"
-							"legitimate RTCW CDROM.\n"
-							"**************************************************\n\n\n",
-							curpack->checksum );
+						"**************************************************\n"
+						"WARNING: " BASEGAME "/pak0.pk3 is present but its checksum (%u)\n"
+						"is not correct. Please re-copy pak0.pk3 from your\n"
+						"legitimate RTCW CDROM.\n"
+						"**************************************************\n\n\n",
+						curpack->checksum );
+
+					Com_Error(ERR_FATAL, NULL);
 				}
+				/*
 				else
 				{
 					Com_Printf("\n\n"
 							"**************************************************\n"
-							"WARNING: " BASEGAME "/sp_pak%d.pk3 is present but its checksum (%u)\n"
+							"WARNING: " BASEGAME "/pak%d.pk3 is present but its checksum (%u)\n"
 							"is not correct. Please re-install the point release\n"
 							"**************************************************\n\n\n",
-							pakBasename[6]-'0', curpack->checksum );
+							pakBasename[3]-'0', curpack->checksum );
 				}
+				*/
 			}
 
-			foundPak |= 1<<(pakBasename[6]-'1');
+			foundPak |= 1<<(pakBasename[3]-'0');
 		}
 		else
 		{
@@ -3819,20 +3818,17 @@ static void FS_CheckSPPaks( void )
 			// Finally check whether this pak's checksum is listed because the user tried
 			// to trick us by renaming the file, and set foundPak's highest bit to indicate this case.
 
-			for(index = 0; index < ARRAY_LEN( en_sppak_checksums ); index++)
+			for(index = 0; index < ARRAY_LEN(pak_checksums); index++)
 			{
-				if( curpack->checksum == en_sppak_checksums[index] ||
-					curpack->checksum == fr_sppak_checksums[index] ||
-					curpack->checksum == it_sppak_checksums[index] ||
-					curpack->checksum == sp_sppak_checksums[index] )
+				if(curpack->checksum == pak_checksums[index])
 				{
 					Com_Printf("\n\n"
-							"**************************************************\n"
-							"WARNING: %s is renamed pak file %s%csp_pak%d.pk3\n"
-							"Running in standalone mode won't work\n"
-							"Please rename, or remove this file\n"
-							"**************************************************\n\n\n",
-							curpack->pakFilename, BASEGAME, PATH_SEP, index);
+						"**************************************************\n"
+						"WARNING: %s is renamed pak file %s%cpak%d.pk3\n"
+						"Running in standalone mode won't work\n"
+						"Please rename, or remove this file\n"
+						"**************************************************\n\n\n",
+						curpack->pakFilename, BASEGAME, PATH_SEP, index);
 
 
 					foundPak |= 0x80000000;
@@ -3848,25 +3844,47 @@ static void FS_CheckSPPaks( void )
 	else
 		Cvar_Set("com_standalone", "0");
 
+	if(!com_standalone->integer)
+	{
+		if(!(foundPak & 0x01))
+		{
+			if(founddemo)
+			{
+				Com_Printf( "\n\n"
+					"**************************************************\n"
+					"WARNING: It looks like you're using pak0.pk3\n"
+					"from the demo. This may work fine, but it is not\n"
+					"guaranteed or supported.\n"
+					"**************************************************\n\n\n" );
+
+				foundPak |= 0x01;
+			}
+		}
+	}
+
 
-	if(!com_standalone->integer && (foundPak & 0x07) != 0x07)
+	if(!com_standalone->integer && (foundPak & 0x01) != 0x01)
 	{
 		char errorText[MAX_STRING_CHARS] = "";
 
-		if((foundPak & 0x07) != 0x07)
+		if((foundPak & 0x01) != 0x01)
 		{
 			Q_strcat(errorText, sizeof(errorText),
-					"Point Release files are missing. Please "
-					"re-install the 1.41 point release. ");
+				"\n\n\"pak0.pk3\" is missing. Please copy it\n"
+				"from your legitimate RTCW CDROM.\n\n");
 		}
 
 		Q_strcat(errorText, sizeof(errorText),
-				va("Also check that your iortcw executable is in "
-					"the correct place and that every file "
-					"in the \"%s\" directory is present and readable", BASEGAME));
+			va("Also check that your iortcw executable is in\n"
+				"the correct place and that every file\n"
+				"in the \"%s\" directory is present and readable.\n\n", BASEGAME));
 
 		Com_Error(ERR_FATAL, "%s", errorText);
 	}
+
+	if(!founddemo)
+		FS_CheckSPPaks();
+
 }
 #endif
 
@@ -4195,7 +4213,6 @@ void FS_InitFilesystem( void ) {
 
 #ifndef STANDALONE
 	FS_CheckPak0( );
-	FS_CheckSPPaks( );
 #endif
 
 	// if we can't find default.cfg, assume that the paths are
@@ -4231,7 +4248,6 @@ void FS_Restart( int checksumFeed ) {
 
 #ifndef STANDALONE
 	FS_CheckPak0( );
-	FS_CheckSPPaks( );
 #endif
 
 	// if we can't find default.cfg, assume that the paths are
diff --git a/SP/code/qcommon/qcommon.h b/SP/code/qcommon/qcommon.h
index 386a9e6..5c1818b 100644
--- a/SP/code/qcommon/qcommon.h
+++ b/SP/code/qcommon/qcommon.h
@@ -630,7 +630,7 @@ issues.
 #define FS_CGAME_REF    0x04
 // #define FS_QAGAME_REF   0x08
 // number of id paks that will never be autodownloaded from baseq3
-#define NUM_ID_PAKS    10 
+#define NUM_ID_PAKS	1
 #define NUM_SP_PAKS	4
 
 #define MAX_FILE_HANDLES    64

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list