fixed memory leak in btMultiSapBroadphase,
fixed hash function (typo, should use 2 proxies) Thanks to Stephen (shatcher) for reporting and fixes! http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1696
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user