Browse Source

bullet: fix compilation error with Bullet 2.81

rdb 7 years ago
parent
commit
69d24993b6
1 changed files with 9 additions and 3 deletions
  1. 9 3
      panda/src/bullet/bulletConvexHullShape.cxx

+ 9 - 3
panda/src/bullet/bulletConvexHullShape.cxx

@@ -39,10 +39,16 @@ BulletConvexHullShape(const BulletConvexHullShape &copy) {
   _shape = new btConvexHullShape(NULL, 0);
   _shape->setUserPointer(this);
 
-  for(int i = 0; i < copy._shape->getNumPoints(); i++)
-      _shape->addPoint(copy._shape->getUnscaledPoints()[i], false);
-
+#if BT_BULLET_VERSION >= 282
+  for (int i = 0; i < copy._shape->getNumPoints(); ++i) {
+    _shape->addPoint(copy._shape->getUnscaledPoints()[i], false);
+  }
   _shape->recalcLocalAabb();
+#else
+  for (int i = 0; i < copy._shape->getNumPoints(); ++i) {
+    _shape->addPoint(copy._shape->getUnscaledPoints()[i]);
+  }
+#endif
 }
 
 /**