diff --git a/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp b/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp index a75689c99..2799b2248 100644 --- a/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp +++ b/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp @@ -80,7 +80,7 @@ btBroadphaseProxy* btMultiSapBroadphase::createProxy( const btVector3& aabbMin, simpleProxy->m_multiSapParentProxy = proxy; mem = btAlignedAlloc(sizeof(btChildProxy),16); - btChildProxy* childProxyRef = new btChildProxy(); + btChildProxy* childProxyRef = new(mem) btChildProxy(); childProxyRef->m_proxy = simpleProxy; childProxyRef->m_childBroadphase = m_simpleBroadphase; proxy->m_childProxies.push_back(childProxyRef); diff --git a/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h b/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h index 8930dbaa9..c3a9339e0 100644 --- a/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h +++ b/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h @@ -177,7 +177,7 @@ private: SIMD_FORCE_INLINE unsigned int getHash(unsigned int proxyId1, unsigned int proxyId2) { - int key = ((unsigned int)proxyId1) | (((unsigned int)proxyId1) <<16); + int key = ((unsigned int)proxyId1) | (((unsigned int)proxyId2) <<16); // Thomas Wang's hash key += ~(key << 15);