git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5060
d7cf8633-e32d-0410-b094-
e92efae38249
Mod_Q3BSP_RecursiveFindNumLeafs(loadmodel->brush.data_nodes);
mod = loadmodel;
- for (i = 0;i < loadmodel->brushq3.num_models;i++)
+ for (i = 0;i < loadmodel->brush.numsubmodels;i++)
{
if (i > 0)
{
for (i = 0;i < MAX_MOD_KNOWN;i++)
{
- if (mod_known[i].name[0] && mod_known[i].type == mod_brushq1)
+ if (mod_known[i].name[0])
{
for (surfacenum = 0, surface = mod_known[i].brush.data_surfaces;surfacenum < mod_known[i].brush.num_surfaces;surfacenum++, surface++)
{
- if (surface->texture->flags & SURF_LIGHTMAP)
+ if (surface->stainsamples)
{
ssize = (surface->extents[0] >> 4) + 1;
tsize = (surface->extents[1] >> 4) + 1;
vec3_t center, v1, v2;
// if there is no model, it can not block visibility
- if (model == NULL)
+ if (model == NULL || !model->brushq1.PointInLeaf)
return true;
portal_markid++;