From a024343cb05582e841f57467fe880d61f50c3792 Mon Sep 17 00:00:00 2001 From: pierow Date: Tue, 30 Jan 2024 01:02:54 -0500 Subject: [PATCH] consistency check shader files --- main/source/dlls/client.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main/source/dlls/client.cpp b/main/source/dlls/client.cpp index 4481cf0a..a3e716e3 100644 --- a/main/source/dlls/client.cpp +++ b/main/source/dlls/client.cpp @@ -1169,10 +1169,13 @@ void ClientPrecache( void ) PRECACHE_UNMODIFIED_GENERIC("ns_shiva.wad"); PRECACHE_UNMODIFIED_GENERIC("ns_tanith.wad"); + // Waste of memory, but files must be precached for the hash check to work. PRECACHE_UNMODIFIED_GENERIC("dlls/ns.dll"); PRECACHE_UNMODIFIED_GENERIC("cl_dlls/client.dll"); PRECACHE_UNMODIFIED_GENERIC("dlls/ns.so"); PRECACHE_UNMODIFIED_GENERIC("cl_dlls/client.so"); + PRECACHE_UNMODIFIED_GENERIC("gl_shaders/fs_world.frag"); + PRECACHE_UNMODIFIED_GENERIC("gl_shaders/vs_world.vert"); /* PRECACHE_UNMODIFIED_GENERIC("maps/co_angst_detail.txt"); PRECACHE_UNMODIFIED_GENERIC("maps/co_core_detail.txt"); @@ -2341,7 +2344,7 @@ int InconsistentFile( const edict_t *player, const char *filename, char *disconn return 1; } // Cheating prone files that aren't commonly used for customization. - if ( (strstr(filename, "player/pl_") != NULL) || (strstr(filename, "player/role") != NULL) || (strstr(filename, ".wad") != NULL) || (strstr(filename, "misc/egg_idle.wav") != NULL)){ + if ( (strstr(filename, "player/pl_") != NULL) || (strstr(filename, "player/role") != NULL) || (strstr(filename, ".wad") != NULL) || (strstr(filename, "misc/egg_idle.wav") != NULL) || (strstr(filename, "gl_shaders/") != NULL)){ // Default behavior is to kick the player sprintf(disconnect_message, "Server is enforcing file consistency for %s. Files available at github.com/ENSL/NS#downloads\n", filename); // Kick now with specified disconnect message.