parse the vis data properly

This commit is contained in:
Bill Currie 2003-09-09 15:29:14 +00:00
parent 26f3839276
commit 9607b8f5f2

View file

@ -188,9 +188,9 @@ VisEntity (int ent_index)
surfacehit = vis + vis_size; surfacehit = vis + vis_size;
memset (surfacehit, 0, (bsp->numfaces + 7) / 8); memset (surfacehit, 0, (bsp->numfaces + 7) / 8);
DecompressVis (bsp->visdata + leaf->visofs, vis, DecompressVis (bsp->visdata + leaf->visofs, vis, vis_size);
(bsp->numleafs + 7) >> 3); for (i = 0, leaf = bsp->leafs + 1; i < bsp->models[0].visleafs;
for (i = 1, leaf = bsp->leafs + 1; i < bsp->numleafs; i++, leaf++) { i++, leaf++) {
if (!leaf->nummarksurfaces) if (!leaf->nummarksurfaces)
continue; continue;
if (vis[i >> 3] & (1 << (i & 7))) { if (vis[i >> 3] & (1 << (i & 7))) {