-/*
+/* -------------------------------------------------------------------------------
+
Copyright (C) 1999-2007 id Software, Inc. and contributors.
For a list of contributors, see the accompanying CONTRIBUTORS file.
if (points > MAX_POINTS_ON_WINDING)
Error ("NewWinding: %i points", points);
- size = (int)((fixedWinding_t *)0)->points[points];
+ size = (int)((size_t)((fixedWinding_t *)0)->points[points]);
w = safe_malloc (size);
memset (w, 0, size);
Sys_Printf ("%6i portalclusters\n", portalclusters);
Sys_Printf ("%6i numportals\n", numportals);
Sys_Printf ("%6i numfaces\n", numfaces);
-
+
// these counts should take advantage of 64 bit systems automatically
leafbytes = ((portalclusters+63)&~63)>>3;
leaflongs = leafbytes/sizeof(long);
Sys_Printf( "Loading %s\n", portalfile );
LoadPortals( portalfile );
+ /* ydnar: exit if no portals, hence no vis */
+ if( numportals == 0 )
+ {
+ Sys_Printf( "No portals means no vis, exiting.\n" );
+ return 0;
+ }
+
/* ydnar: for getting far plane */
ParseEntities();