From 69d24993b65d8efa914c075828446f0feda3b612 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 22 Mar 2018 15:30:31 +0100 Subject: [PATCH] bullet: fix compilation error with Bullet 2.81 --- panda/src/bullet/bulletConvexHullShape.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/panda/src/bullet/bulletConvexHullShape.cxx b/panda/src/bullet/bulletConvexHullShape.cxx index 75a3182a34..07d559c2fd 100644 --- a/panda/src/bullet/bulletConvexHullShape.cxx +++ b/panda/src/bullet/bulletConvexHullShape.cxx @@ -39,10 +39,16 @@ BulletConvexHullShape(const BulletConvexHullShape ©) { _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 } /**