From 880f84f8c44f99ef85c2efbc8d1d3c8da39258ab Mon Sep 17 00:00:00 2001 From: lawnjelly Date: Tue, 20 Dec 2022 19:25:34 +0000 Subject: [PATCH] Fix pairing crash in physics Octree Remove section of code that should not run and was causing crash. --- servers/physics/broad_phase_octree.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/servers/physics/broad_phase_octree.cpp b/servers/physics/broad_phase_octree.cpp index 482f818ac..14fc8390e 100644 --- a/servers/physics/broad_phase_octree.cpp +++ b/servers/physics/broad_phase_octree.cpp @@ -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;