From 5ea79f073c9ff55f7872b358851a7d78c4065def Mon Sep 17 00:00:00 2001 From: myT Date: Thu, 25 Jan 2018 05:25:57 +0100 Subject: [PATCH] re-ordering the pak list when connected to a pure server this fixes pure listen servers allowing unpure overrides for the owner --- changelog.txt | 2 ++ code/qcommon/files.cpp | 6 +++--- code/qcommon/qcommon.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 686a9cd..66d8136 100644 --- a/changelog.txt +++ b/changelog.txt @@ -14,6 +14,8 @@ chg: on Windows, a fatal error will move the early console window to the foregro chg: com_hunkMegs doesn't have a maximum value anymore a value too high would reset it and the engine might fail to load with the default value +fix: conditional FS restarts will always re-order the pak list when connected to a pure server + fix: lifted the directory scanning restriction that affected pure listen servers fix: getting stuck on "Awaiting snapshot..." when the server shuts down during client connection diff --git a/code/qcommon/files.cpp b/code/qcommon/files.cpp index 36ce437..8435034 100644 --- a/code/qcommon/files.cpp +++ b/code/qcommon/files.cpp @@ -3081,12 +3081,12 @@ FS_ConditionalRestart restart if necessary ================= */ -qbool FS_ConditionalRestart( int checksumFeed ) { +void FS_ConditionalRestart( int checksumFeed ) { if( fs_gamedirvar->modified || checksumFeed != fs_checksumFeed ) { FS_Restart( checksumFeed ); - return qtrue; + } else if ( fs_numServerPaks && !fs_reordered ) { + FS_ReorderPurePaks(); } - return qfalse; } /* diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h index ccea3e2..86897a4 100644 --- a/code/qcommon/qcommon.h +++ b/code/qcommon/qcommon.h @@ -626,7 +626,7 @@ qbool FS_Initialized(); void FS_InitFilesystem(); void FS_Shutdown( qbool closemfp ); -qbool FS_ConditionalRestart( int checksumFeed ); +void FS_ConditionalRestart( int checksumFeed ); void FS_Restart( int checksumFeed ); // shutdown and restart the filesystem so changes to fs_gamedir can take effect