From 9607b8f5f2e71dc238c4dbda934ac59b3ca8ab1d Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 9 Sep 2003 15:29:14 +0000 Subject: [PATCH] parse the vis data properly --- tools/qflight/source/vis.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/qflight/source/vis.c b/tools/qflight/source/vis.c index 53e028b79..457db4b8e 100644 --- a/tools/qflight/source/vis.c +++ b/tools/qflight/source/vis.c @@ -188,9 +188,9 @@ VisEntity (int ent_index) surfacehit = vis + vis_size; memset (surfacehit, 0, (bsp->numfaces + 7) / 8); - DecompressVis (bsp->visdata + leaf->visofs, vis, - (bsp->numleafs + 7) >> 3); - for (i = 1, leaf = bsp->leafs + 1; i < bsp->numleafs; i++, leaf++) { + DecompressVis (bsp->visdata + leaf->visofs, vis, vis_size); + for (i = 0, leaf = bsp->leafs + 1; i < bsp->models[0].visleafs; + i++, leaf++) { if (!leaf->nummarksurfaces) continue; if (vis[i >> 3] & (1 << (i & 7))) {