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

This commit is contained in:
Thilo Schulz 2009-10-11 16:34:26 +00:00
parent a97ab9f2fe
commit fd90f4f579

View file

@ -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);