From 4217dcf119bd52d41c779c66a87de13cfa704448 Mon Sep 17 00:00:00 2001 From: thilo Date: Sun, 11 Oct 2009 16:34:26 +0000 Subject: Fix fake checksum handling if client is unpure, make sure client does not remain unpure after FS_Restart. Thanks to /dev/humancontroller for reporting. http://bugzilla.icculus.org/show_bug.cgi?id=3605, thanks git-svn-id: svn://svn.icculus.org/quake3/trunk@1654 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/qcommon/files.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/qcommon/files.c b/code/qcommon/files.c index 7bbfc45..7b4fc81 100644 --- a/code/qcommon/files.c +++ b/code/qcommon/files.c @@ -1186,7 +1186,9 @@ int FS_FOpenFileRead( const char *filename, fileHandle_t *file, qboolean uniqueF && Q_stricmp( filename + l - 5, ".game" ) // menu files && Q_stricmp( filename + l - strlen(demoExt), demoExt ) // menu files && Q_stricmp( filename + l - 4, ".dat" ) ) { // for journal files - fs_fakeChkSum = random(); + + if(!(fs_fakeChkSum = random())) + fs_fakeChkSum = 0xdeadbeef; } Q_strncpyz( fsh[*file].name, filename, sizeof( fsh[*file].name ) ); @@ -3346,6 +3348,7 @@ void FS_Restart( int checksumFeed ) { // set the checksum feed fs_checksumFeed = checksumFeed; + fs_fakeChkSum = 0; // clear pak references FS_ClearPakReferences(0); -- cgit v1.2.3