Skip to content

Commit

Permalink
Merge pull request #29 from Tokeiburu/quadtree-fix
Browse files Browse the repository at this point in the history
Calc quadtree check for a broken/corrupted model.
  • Loading branch information
Borf authored Dec 28, 2024
2 parents 17a23d5 + 6b2658d commit 85e02a8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions browedit/components/Rsw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,9 @@ void Rsw::recalculateQuadtree(QuadTreeNode* node)
{
auto vertices = collider->getAllVerticesWorldSpace();

if (vertices.size() == 0)
return;

// Translate coords with gnd coords instead, it makes comparisons much easier later
for (auto& v : vertices) {
v.x = v.x - gnd->width * 5.0f;
Expand Down

0 comments on commit 85e02a8

Please sign in to comment.