Recast: only run polygroup union logic if it won't be collapsed

No point in running this code if we are going to collapse it. This also fixes a possible deadlock when removing and rebuilding individual tiles.
This commit is contained in:
Kawe Mazidjatari 2024-10-22 11:59:43 +02:00
parent 1ad2f18573
commit 8eb294b731

View File

@ -442,7 +442,8 @@ static void copyBaseDisjointSets(const dtTraverseTableCreateParams* params)
if (i > 0) // Don't copy the base into itself.
set.copy(targetSet);
unionTraverseLinkedPolyGroups(params, i);
if (!params->collapseGroups)
unionTraverseLinkedPolyGroups(params, i);
}
}