Browse Source

bullet: Fixed deadlock when loading from collision solids

        - Fixed deadlock when loading ghost nodes from collision solids and
        have non-identity scale applied.

Signed-off-by: deflected <[email protected]>
deflected 7 years ago
parent
commit
8ad4c8e23c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/bullet/bulletGhostNode.cxx

+ 1 - 1
panda/src/bullet/bulletGhostNode.cxx

@@ -97,7 +97,7 @@ do_transform_changed() {
     if (ts->has_scale()) {
     if (ts->has_scale()) {
       LVecBase3 scale = ts->get_scale();
       LVecBase3 scale = ts->get_scale();
       if (!scale.almost_equal(LVecBase3(1.0f, 1.0f, 1.0f))) {
       if (!scale.almost_equal(LVecBase3(1.0f, 1.0f, 1.0f))) {
-        for (int i=0; i<get_num_shapes(); i++) {
+        for (int i=0; i < _shapes.size(); i++) {
           PT(BulletShape) shape = _shapes[i];
           PT(BulletShape) shape = _shapes[i];
           shape->do_set_local_scale(scale);
           shape->do_set_local_scale(scale);
         }
         }