summaryrefslogtreecommitdiff
path: root/core/math/bvh_structs.inc
diff options
context:
space:
mode:
authorlawnjelly <lawnjelly@gmail.com>2021-05-29 18:03:43 +0100
committerlawnjelly <lawnjelly@gmail.com>2021-05-29 18:03:43 +0100
commitbd42de5fea718ed6bf680dddbb8d823dd6760b68 (patch)
treefc40a8db10c5c6764d3cf7bbd7b42b5bdc922f0b /core/math/bvh_structs.inc
parentb63f9b59615a4a63f1a45564d78243a2929c3c03 (diff)
BVH - fix stale current_tree in deactivate function [4.x]
Changes passing of current_tree from a member variable to a function argument, making bugs due to stale state less likely. Fix a bug in deactivate where current_tree variable was stale. This may have resulted in visual anomalies.
Diffstat (limited to 'core/math/bvh_structs.inc')
-rw-r--r--core/math/bvh_structs.inc1
1 files changed, 0 insertions, 1 deletions
diff --git a/core/math/bvh_structs.inc b/core/math/bvh_structs.inc
index 4133ba6c10..1d1e0e6468 100644
--- a/core/math/bvh_structs.inc
+++ b/core/math/bvh_structs.inc
@@ -162,7 +162,6 @@ enum { NUM_TREES = 2,
// Tree 1 - Pairable
// This is more efficient because in physics we only need check non pairable against the pairable tree.
uint32_t _root_node_id[NUM_TREES];
-int _current_tree = 0;
// these values may need tweaking according to the project
// the bound of the world, and the average velocities of the objects