From 50114acc4e22041001338a766ded520afcd1e75d Mon Sep 17 00:00:00 2001 From: tankefugl Date: Fri, 18 Nov 2005 15:44:26 +0000 Subject: [PATCH] o Only ssay81.wav now plays when invoking "weld me" o Fixed bug in the inconsistency ignore git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@354 67975925-1194-0748-b3d5-c16f83f1a3a1 --- releases/3.1.1/source/dlls/client.cpp | 1 + releases/3.1.1/source/util/STLUtil.cpp | 29 ++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/releases/3.1.1/source/dlls/client.cpp b/releases/3.1.1/source/dlls/client.cpp index 776e84e9..001cfdad 100644 --- a/releases/3.1.1/source/dlls/client.cpp +++ b/releases/3.1.1/source/dlls/client.cpp @@ -2250,6 +2250,7 @@ int InconsistentFile( const edict_t *player, const char *filename, char *disconn while ( ignoreInConsistencyCheck[i] != 0 ) { if ( !strcmp(ignoreInConsistencyCheck[i], filename) ) return 0; + i++; } // Default behavior is to kick the player sprintf( disconnect_message, "Server is enforcing file consistency for %s\n", filename ); diff --git a/releases/3.1.1/source/util/STLUtil.cpp b/releases/3.1.1/source/util/STLUtil.cpp index bff0b680..accc8c0b 100644 --- a/releases/3.1.1/source/util/STLUtil.cpp +++ b/releases/3.1.1/source/util/STLUtil.cpp @@ -229,6 +229,12 @@ string BuildAbridgedString(const string& inString, int inMaxLen) return theAbridgedString; } +static char *ignoreSounds[] = { + "vox/ssay82.wav", + "vox/ssay83.wav", + 0 +}; + // Pass in relative path, do search on path including mod directory, return files relative to mod directory bool BuildFileList(const string& inBaseDirectoryName, const string& inDirectoryName, const string& inFileExtension, CStringList& outList) { @@ -288,8 +294,27 @@ bool BuildFileList(const string& inBaseDirectoryName, const string& inDirectoryN std::replace(theFullFileName.begin(), theFullFileName.end(), '\\', '/'); theCString = theFullFileName; - outList.push_back(theCString); - theSuccess = true; +#ifdef AVH_SERVER + // Ignore ssay82 and ssay83 till we can client patch this .. + int i=0; + bool found = false; + while ( ignoreSounds[i] != 0 ) { + if ( !strcmp(ignoreSounds[i], theCString)) + { + found = true; + } + i++; + } + if (found == false) + { +#endif + outList.push_back(theCString); + theSuccess = true; +#ifdef AVH_SERVER + } + // +#endif + #ifdef WIN32 } while(FindNextFile(theFileHandle, &theFindData));