Skip to content

[ALL] Extended some internal BSP limits. #1176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/public/bspfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
// 16 bit short limits
#define MAX_MAP_MODELS 1024
#define MAX_MAP_BRUSHES 8192
#define MAX_MAP_ENTITIES 8192
#define MAX_MAP_ENTITIES 32768
#define MAX_MAP_TEXINFO 12288
#define MAX_MAP_TEXDATA 2048
#define MAX_MAP_DISPINFO 2048
Expand Down Expand Up @@ -90,12 +90,14 @@
#define MAX_MAP_LIGHTING 0x1000000
#define MAX_MAP_VISIBILITY 0x1000000 // increased BSPVERSION 7
#define MAX_MAP_TEXTURES 1024
#define MAX_MAP_WORLDLIGHTS 8192
#define MAX_MAP_WORLDLIGHTS 65536
#define MAX_MAP_CUBEMAPSAMPLES 1024
#define MAX_MAP_OVERLAYS 512
#define MAX_MAP_OVERLAYS 8192
#define MAX_MAP_WATEROVERLAYS 16384
#define MAX_MAP_TEXDATA_STRING_DATA 256000
#define MAX_MAP_TEXDATA_STRING_TABLE 65536
#define MAX_MAP_DETAIL_PROPS 65536 // The object lump is variable-sized, so there's no strict limit.
// The MAX_MAP_DETAIL_PROPS limit is just a warning for the user.
// this is stuff for trilist/tristrips, etc.
#define MAX_MAP_PRIMITIVES 32768
#define MAX_MAP_PRIMVERTS 65536
Expand Down
5 changes: 3 additions & 2 deletions src/utils/vbsp/detailobjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,10 @@ static void AddDetailSpriteToLump( const Vector &vecOrigin, const QAngle &vecAng
// Insert an element into the object dictionary if it aint there...
int i = s_DetailObjectLump.AddToTail( );

if (i >= 65535)
if (i >= MAX_MAP_DETAIL_PROPS)
{
Error( "Error! Too many detail props emitted on this map! (64K max!)n" );
Warning( "Warning: Too many detail props emitted on this map! (recommended: %d, actual: %d\n"
"This can cause performance issues!\n", MAX_MAP_DETAIL_PROPS, i);
}

DetailObjectLump_t& objectLump = s_DetailObjectLump[i];
Expand Down