Skip to content

Commit

Permalink
Merge pull request #70365 from lawnjelly/octree_pairing_fix
Browse files Browse the repository at this point in the history
Fix pairing crash in physics Octree
  • Loading branch information
akien-mga committed Dec 22, 2022
2 parents 7a46f61 + 6a2912c commit 39edf7e
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions servers/physics/broad_phase_octree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,6 @@ void *BroadPhaseOctree::_pair_callback(void *self, OctreeElementID p_A, Collisio
}

bool valid_collision_pair = p_object_A->test_collision_mask(p_object_B);
void *pair_data = bpo->pair_userdata;

if (pair_data) {
// Checking an existing pair.
if (valid_collision_pair) {
// Nothing to do, pair is still valid.
return pair_data;
} else {
// Logical collision not valid anymore, unpair.
_unpair_callback(self, p_A, p_object_A, subindex_A, p_B, p_object_B, subindex_B, pair_data);
return nullptr;
}
}

if (!valid_collision_pair) {
return nullptr;
Expand Down

0 comments on commit 39edf7e

Please sign in to comment.