mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-10-23 09:10:59 +00:00
Merge pull request #2858 from CGJiaxiLiu/fix_softbody
Fix potential undefined softbody member in PhysicsServerCommandProcessor
This commit is contained in:
@@ -64,9 +64,10 @@ struct TcpNetworkedInternalData
|
||||
{
|
||||
m_tcpSocket.SetSendTimeout(m_timeOutInSeconds, 0);
|
||||
m_tcpSocket.SetReceiveTimeout(m_timeOutInSeconds, 0);
|
||||
int key = SHARED_MEMORY_MAGIC_NUMBER;
|
||||
m_tcpSocket.Send((uint8*)&key, 4);
|
||||
}
|
||||
int key = SHARED_MEMORY_MAGIC_NUMBER;
|
||||
m_tcpSocket.Send((uint8*)&key, 4);
|
||||
|
||||
|
||||
return m_isConnected;
|
||||
}
|
||||
|
||||
@@ -11008,6 +11008,7 @@ bool PhysicsServerCommandProcessor::processApplyExternalForceCommand(const struc
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef SKIP_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD
|
||||
if (body && body->m_softBody)
|
||||
{
|
||||
btSoftBody* sb = body->m_softBody;
|
||||
@@ -11030,6 +11031,8 @@ bool PhysicsServerCommandProcessor::processApplyExternalForceCommand(const struc
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
SharedMemoryStatus& serverCmd = serverStatusOut;
|
||||
@@ -11782,6 +11785,8 @@ bool PhysicsServerCommandProcessor::processCreateUserConstraintCommand(const str
|
||||
delete userConstraintPtr->m_rbConstraint;
|
||||
m_data->m_userConstraints.remove(userConstraintUidRemove);
|
||||
}
|
||||
#ifndef SKIP_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD
|
||||
|
||||
if (userConstraintPtr->m_sbHandle >= 0)
|
||||
{
|
||||
InternalBodyHandle* sbodyHandle = m_data->m_bodyHandles.getHandle(clientCmd.m_userConstraintArguments.m_parentBodyIndex);
|
||||
@@ -11800,6 +11805,7 @@ bool PhysicsServerCommandProcessor::processCreateUserConstraintCommand(const str
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
serverCmd.m_userConstraintResultArgs.m_userConstraintUniqueId = userConstraintUidRemove;
|
||||
serverCmd.m_type = CMD_REMOVE_USER_CONSTRAINT_COMPLETED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user