]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
increase MAX_PORTALS, also show an error if exceeded
authordivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Sun, 24 May 2009 18:08:22 +0000 (18:08 +0000)
committerdivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Sun, 24 May 2009 18:08:22 +0000 (18:08 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@376 61c419a2-8eb2-4b30-bcec-8cead039b335

tools/quake3/q3map2/q3map2.h
tools/quake3/q3map2/vis.c

index 1a63487f532066814bdb6fe114019bf3084ed9a0..3e0595cf0e20d8539182e9a95d4e8e31035884f9 100644 (file)
@@ -215,7 +215,7 @@ constants
 
 #define        PORTALFILE                              "PRT1"
 
-#define        MAX_PORTALS                             32768
+#define        MAX_PORTALS                             0x20000 /* same as MAX_MAP_PORTALS */
 #define MAX_SEPERATORS                 MAX_POINTS_ON_WINDING
 #define        MAX_POINTS_ON_FIXED_WINDING     24      /* ydnar: increased this from 12 at the expense of more memory */
 #define        MAX_PORTALS_ON_LEAF             1024
index 9cbbe59cf720bb777ad0d2e809fb4b10983ca2a4..0bc8313f0d7113a8d27e54a2105b8333727cd546 100644 (file)
@@ -897,6 +897,9 @@ void LoadPortals (char *name)
        Sys_Printf ("%6i portalclusters\n", portalclusters);
        Sys_Printf ("%6i numportals\n", numportals);
        Sys_Printf ("%6i numfaces\n", numfaces);
+
+       if(numportals > MAX_PORTALS)
+               Error("MAX_PORTALS");
        
        // these counts should take advantage of 64 bit systems automatically
        leafbytes = ((portalclusters+63)&~63)>>3;