[qfvis] Delay freeing of winding memory

If anything, this is probably a nano-optimization, depending on how
often portals are vis-rejected. I couldn't see any actual difference.
This commit is contained in:
Bill Currie 2021-08-08 12:31:29 +09:00
parent 9a93bf8d4a
commit 2828500f04

View file

@ -361,8 +361,6 @@ RecursiveClusterFlow (int clusternum, threaddata_t *thread, pstack_t *prevstack)
if (!set_is_member (prevstack->mightsee, target_portal->cluster))
continue; // can't possibly see it
free_winding_memory (thread, winding_mark);
// if target_portal can't see anything we haven't already seen, skip it
test = select_test_set (target_portal, thread);
if (!mightsee_more (might, prevstack->mightsee, test, vis)) {
@ -379,6 +377,8 @@ RecursiveClusterFlow (int clusternum, threaddata_t *thread, pstack_t *prevstack)
continue; // can't go out a coplanar face
}
free_winding_memory (thread, winding_mark);
thread->stats.portalcheck++;
target_winding = target_portal->winding;