increase MAX_PORTALS, also show an error if exceeded
git-svn-id: svn://svn.icculus.org/netradiant/trunk@376 61c419a2-8eb2-4b30-bcec-8cead039b335
This commit is contained in:
parent
1ffb1aef2e
commit
c2c3a2ed3d
|
|
@ -215,7 +215,7 @@ constants
|
||||||
|
|
||||||
#define PORTALFILE "PRT1"
|
#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_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_POINTS_ON_FIXED_WINDING 24 /* ydnar: increased this from 12 at the expense of more memory */
|
||||||
#define MAX_PORTALS_ON_LEAF 1024
|
#define MAX_PORTALS_ON_LEAF 1024
|
||||||
|
|
|
||||||
|
|
@ -898,6 +898,9 @@ void LoadPortals (char *name)
|
||||||
Sys_Printf ("%6i numportals\n", numportals);
|
Sys_Printf ("%6i numportals\n", numportals);
|
||||||
Sys_Printf ("%6i numfaces\n", numfaces);
|
Sys_Printf ("%6i numfaces\n", numfaces);
|
||||||
|
|
||||||
|
if(numportals > MAX_PORTALS)
|
||||||
|
Error("MAX_PORTALS");
|
||||||
|
|
||||||
// these counts should take advantage of 64 bit systems automatically
|
// these counts should take advantage of 64 bit systems automatically
|
||||||
leafbytes = ((portalclusters+63)&~63)>>3;
|
leafbytes = ((portalclusters+63)&~63)>>3;
|
||||||
leaflongs = leafbytes/sizeof(long);
|
leaflongs = leafbytes/sizeof(long);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user