]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/bspfile_abstract.c
force the first stage of subsampling on luxels that are hit through an alphashadow...
[xonotic/netradiant.git] / tools / quake3 / q3map2 / bspfile_abstract.c
index 0e77526fc5d845833be848311f2e38b150602770..ef78160f737ad15bd9e35586f09f33aafd53f54e 100644 (file)
@@ -642,13 +642,22 @@ void UnparseEntities( void )
        
        
        /* setup */
+       AUTOEXPAND_BY_REALLOC(bspEntData, 0, allocatedBSPEntData, 1024);
        buf = bspEntData;
        end = buf;
        *end = 0;
+
        
        /* run through entity list */
        for( i = 0; i < numBSPEntities && i < numEntities; i++ )
        {
+               {
+                       int sz = end - buf;
+                       AUTOEXPAND_BY_REALLOC(bspEntData, sz + 65536, allocatedBSPEntData, 1024);
+                       buf = bspEntData;
+                       end = buf + sz;
+               }
+
                /* get epair */
                ep = entities[ i ].epairs;
                if( ep == NULL )
@@ -685,7 +694,7 @@ void UnparseEntities( void )
                end += 2;
                
                /* check for overflow */
-               if( end > buf + MAX_MAP_ENTSTRING )
+               if( end > buf + allocatedBSPEntData )
                        Error( "Entity text too long" );
        }