From 5efe29d863b60cbee268c9336a15346b88a6cb52 Mon Sep 17 00:00:00 2001 From: Garux Date: Thu, 20 May 2021 17:10:31 +0300 Subject: [PATCH] * use dynamic maxSurfaceVerts (user preference/game define) in 'force meta process for a surface' decision (was hardcoded) --- tools/quake3/q3map2/q3map2.h | 3 --- tools/quake3/q3map2/surface.cpp | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/quake3/q3map2/q3map2.h b/tools/quake3/q3map2/q3map2.h index bbcb67b8..47050a9e 100644 --- a/tools/quake3/q3map2/q3map2.h +++ b/tools/quake3/q3map2/q3map2.h @@ -121,9 +121,6 @@ #define MAX_SHADER_INFO 8192 #define MAX_CUST_SURFACEPARMS 256 -#define SHADER_MAX_VERTEXES 1000 -#define SHADER_MAX_INDEXES ( 6 * SHADER_MAX_VERTEXES ) - #define MAX_JITTERS 256 diff --git a/tools/quake3/q3map2/surface.cpp b/tools/quake3/q3map2/surface.cpp index 8cddb7e1..214ebefa 100644 --- a/tools/quake3/q3map2/surface.cpp +++ b/tools/quake3/q3map2/surface.cpp @@ -469,7 +469,7 @@ void ClassifySurfaces( int numSurfs, mapDrawSurface_t *ds ){ ----------------------------------------------------------------- */ if ( ds->type != ESurfaceType::Patch && ds->type != ESurfaceType::Face ) { - if ( ds->numVerts > SHADER_MAX_VERTEXES ) { + if ( ds->numVerts > maxSurfaceVerts ) { ds->type = ESurfaceType::ForcedMeta; } }