From cd27ffd8b03e913eb75770a240858e7c973e06b2 Mon Sep 17 00:00:00 2001 From: Chuyuan Fu Date: Tue, 3 Sep 2019 14:27:19 -0700 Subject: [PATCH] add body type info to dynamics info --- examples/SharedMemory/PhysicsServerCommandProcessor.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp index d983ed83c..4ae8dbbcf 100644 --- a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp +++ b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp @@ -8902,8 +8902,8 @@ bool PhysicsServerCommandProcessor::processGetDynamicsInfoCommand(const struct S { SharedMemoryStatus& serverCmd = serverStatusOut; serverCmd.m_type = CMD_GET_DYNAMICS_INFO_COMPLETED; - serverCmd.m_dynamicsInfo.m_bodyType = BT_MULTI_BODY; - + serverCmd.m_dynamicsInfo.m_bodyType = BT_MULTI_BODY; + btMultiBody* mb = body->m_multiBody; if (linkIndex == -1) { @@ -9017,7 +9017,7 @@ bool PhysicsServerCommandProcessor::processGetDynamicsInfoCommand(const struct S { SharedMemoryStatus& serverCmd = serverStatusOut; serverCmd.m_type = CMD_GET_DYNAMICS_INFO_COMPLETED; - serverCmd.m_dynamicsInfo.m_bodyType = BT_RIGID_BODY; + serverCmd.m_dynamicsInfo.m_bodyType = BT_RIGID_BODY; btRigidBody* rb = body->m_rigidBody; serverCmd.m_dynamicsInfo.m_lateralFrictionCoeff = rb->getFriction(); @@ -9028,8 +9028,7 @@ bool PhysicsServerCommandProcessor::processGetDynamicsInfoCommand(const struct S serverCmd.m_dynamicsInfo.m_mass = rb->getMass(); } #ifndef SKIP_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD - else if (body && body->m_softBody) - { + else if (body && body->m_softBody){ SharedMemoryStatus& serverCmd = serverStatusOut; serverCmd.m_type = CMD_GET_DYNAMICS_INFO_COMPLETED; serverCmd.m_dynamicsInfo.m_bodyType = BT_SOFT_BODY;