diff options
author | Tigran Gasparian <gaspariantigran@gmail.com> | 2019-08-08 13:20:44 +0200 |
---|---|---|
committer | Tigran Gasparian <gaspariantigran@gmail.com> | 2019-08-08 13:20:44 +0200 |
commit | ebe6d2df8641135248fd2762efb92ad3d6fe26bc (patch) | |
tree | d1d45cd811af31837349d2ebec39dd5cd57eff92 | |
parent | cf25b6183d6e48b67ff471b6e9c1aee8e2d66522 (diff) | |
download | bullet3-ebe6d2df8641135248fd2762efb92ad3d6fe26bc.tar.gz |
Don't reset user data on SyncBodyInfo()
-rw-r--r-- | examples/SharedMemory/PhysicsClientSharedMemory.cpp | 4 | ||||
-rw-r--r-- | examples/SharedMemory/PhysicsDirect.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/SharedMemory/PhysicsClientSharedMemory.cpp b/examples/SharedMemory/PhysicsClientSharedMemory.cpp index 0ea041808..71e1a1985 100644 --- a/examples/SharedMemory/PhysicsClientSharedMemory.cpp +++ b/examples/SharedMemory/PhysicsClientSharedMemory.cpp @@ -294,8 +294,6 @@ void PhysicsClientSharedMemory::clearCachedBodies() } } m_data->m_bodyJointMap.clear(); - m_data->m_userDataHandleLookup.clear(); - m_data->m_userDataMap.clear(); } void PhysicsClientSharedMemory::resetData() @@ -304,6 +302,8 @@ void PhysicsClientSharedMemory::resetData() m_data->m_debugLinesTo.clear(); m_data->m_debugLinesColor.clear(); m_data->m_userConstraintInfoMap.clear(); + m_data->m_userDataMap.clear(); + m_data->m_userDataHandleLookup.clear(); clearCachedBodies(); } void PhysicsClientSharedMemory::setSharedMemoryKey(int key) diff --git a/examples/SharedMemory/PhysicsDirect.cpp b/examples/SharedMemory/PhysicsDirect.cpp index 8cdaca31c..ba0aa9508 100644 --- a/examples/SharedMemory/PhysicsDirect.cpp +++ b/examples/SharedMemory/PhysicsDirect.cpp @@ -143,6 +143,8 @@ void PhysicsDirect::resetData() m_data->m_debugLinesTo.clear(); m_data->m_debugLinesColor.clear(); m_data->m_userConstraintInfoMap.clear(); + m_data->m_userDataMap.clear(); + m_data->m_userDataHandleLookup.clear(); clearCachedBodies(); } @@ -157,8 +159,6 @@ void PhysicsDirect::clearCachedBodies() } } m_data->m_bodyJointMap.clear(); - m_data->m_userDataMap.clear(); - m_data->m_userDataHandleLookup.clear(); } // return true if connection succesfull, can also check 'isConnected' |