mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:17:45 +02:00
Merge pull request #15495 from Atlante45/fix/deadlock
Case 22433: master: Query shape type outside lock
This commit is contained in:
commit
5a603c20aa
2 changed files with 3 additions and 1 deletions
|
@ -2023,9 +2023,10 @@ void EntityItem::setCollisionMask(uint16_t value) {
|
||||||
|
|
||||||
void EntityItem::setDynamic(bool value) {
|
void EntityItem::setDynamic(bool value) {
|
||||||
if (getDynamic() != value) {
|
if (getDynamic() != value) {
|
||||||
|
auto shapeType = getShapeType();
|
||||||
withWriteLock([&] {
|
withWriteLock([&] {
|
||||||
// dynamic and STATIC_MESH are incompatible so we check for that case
|
// dynamic and STATIC_MESH are incompatible so we check for that case
|
||||||
if (value && getShapeType() == SHAPE_TYPE_STATIC_MESH) {
|
if (value && shapeType == SHAPE_TYPE_STATIC_MESH) {
|
||||||
if (_dynamic) {
|
if (_dynamic) {
|
||||||
_dynamic = false;
|
_dynamic = false;
|
||||||
_flags |= Simulation::DIRTY_MOTION_TYPE;
|
_flags |= Simulation::DIRTY_MOTION_TYPE;
|
||||||
|
|
|
@ -269,6 +269,7 @@ enum class EntityVersion : PacketVersion {
|
||||||
CertificateTypeProperty,
|
CertificateTypeProperty,
|
||||||
DisableWebMedia,
|
DisableWebMedia,
|
||||||
ParticleShapeType,
|
ParticleShapeType,
|
||||||
|
ParticleShapeTypeDeadlockFix,
|
||||||
|
|
||||||
// Add new versions above here
|
// Add new versions above here
|
||||||
NUM_PACKET_TYPE,
|
NUM_PACKET_TYPE,
|
||||||
|
|
Loading…
Reference in a new issue