fix an out-by-one error

This commit is contained in:
Bill Currie 2003-03-17 00:52:16 +00:00
parent 2173151560
commit 3a85d98f83
1 changed files with 2 additions and 2 deletions

View File

@ -391,7 +391,7 @@ ClusterFlow (int clusternum)
totalvis += numvis;
i = CompressRow (outbuffer, compressed);
cluster->visofs = visdata->size;
cluster->visofs = visdata->size;
dstring_append (visdata, compressed, i);
}
@ -464,7 +464,7 @@ CalcVis (void)
ClusterFlow (i);
for (i = 0; i < numrealleafs; i++) {
bsp->leafs[i].visofs = clusters[leafcluster[i]].visofs;
bsp->leafs[i + 1].visofs = clusters[leafcluster[i]].visofs;
}
if (options.verbosity >= 0)
printf ("average clusters visible: %i\n", totalvis / portalclusters);