[qw] Use set_count to count the pvs/phs leafs

This commit is contained in:
Bill Currie 2021-07-27 14:01:08 +09:00
parent 163d147044
commit 1f57f81a20

View file

@ -263,10 +263,7 @@ SV_CalcPHS (void)
&sv.pvs[i]); &sv.pvs[i]);
if (i == 0) if (i == 0)
continue; continue;
for (set_iter_t *iter = set_first (&sv.pvs[i]); iter; vcount += set_count (&sv.pvs[i]);
iter = set_next (iter)) {
vcount++;
}
} }
sv.phs = sv_alloc_vis_array (num); sv.phs = sv_alloc_vis_array (num);
@ -283,10 +280,7 @@ SV_CalcPHS (void)
if (i == 0) if (i == 0)
continue; continue;
for (set_iter_t *iter = set_first (&sv.phs[i]); iter; count += set_count (&sv.phs[i]);
iter = set_next (iter)) {
count++;
}
} }
SV_Printf ("Average leafs visible / hearable / total: %i / %i / %i\n", SV_Printf ("Average leafs visible / hearable / total: %i / %i / %i\n",