From f20fddee1c9cdd1bc613960f6caf999d71732610 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 15 Dec 2022 00:42:40 +0300 Subject: [PATCH] common: bspfile: add separate definitions for clipnodes limit for HLBSP and QBSP2 --- common/bspfile.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/bspfile.h b/common/bspfile.h index 1fa5721a..be6642ab 100644 --- a/common/bspfile.h +++ b/common/bspfile.h @@ -61,13 +61,16 @@ BRUSH MODELS #define LS_UNUSED 0xFE #define LS_NONE 0xFF +#define MAX_MAP_CLIPNODES_HLBSP 32767 +#define MAX_MAP_CLIPNODES_BSP2 524288 + // these limis not using by modelloader but only for displaying 'mapstats' correctly #ifdef SUPPORT_BSP2_FORMAT #define MAX_MAP_MODELS 2048 // embedded models #define MAX_MAP_ENTSTRING 0x200000 // 2 Mb should be enough #define MAX_MAP_PLANES 131072 // can be increased without problems #define MAX_MAP_NODES 262144 // can be increased without problems -#define MAX_MAP_CLIPNODES 524288 // can be increased without problems +#define MAX_MAP_CLIPNODES MAX_MAP_CLIPNODES_BSP2 // can be increased without problems #define MAX_MAP_LEAFS 131072 // CRITICAL STUFF to run ad_sepulcher!!! #define MAX_MAP_VERTS 524288 // can be increased without problems #define MAX_MAP_FACES 262144 // can be increased without problems @@ -78,7 +81,7 @@ BRUSH MODELS #define MAX_MAP_ENTSTRING 0x100000 // 1 Mb should be enough #define MAX_MAP_PLANES 65536 // can be increased without problems #define MAX_MAP_NODES 32767 // because negative shorts are leafs -#define MAX_MAP_CLIPNODES 32767 // because negative shorts are contents +#define MAX_MAP_CLIPNODES MAX_MAP_CLIPNODES_HLBSP // because negative shorts are contents #define MAX_MAP_LEAFS 32767 // signed short limit #define MAX_MAP_VERTS 65535 // unsigned short limit #define MAX_MAP_FACES 65535 // unsigned short limit