From 099e04f7bbcffe16efdea5e61634d9a7ce94da3c Mon Sep 17 00:00:00 2001 From: Clement Date: Tue, 30 Apr 2019 17:57:37 -0700 Subject: [PATCH 1/2] Query shape type outside lock --- libraries/entities/src/EntityItem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/entities/src/EntityItem.cpp b/libraries/entities/src/EntityItem.cpp index 8a50c39da9..9ae9246176 100644 --- a/libraries/entities/src/EntityItem.cpp +++ b/libraries/entities/src/EntityItem.cpp @@ -2023,9 +2023,10 @@ void EntityItem::setCollisionMask(uint16_t value) { void EntityItem::setDynamic(bool value) { if (getDynamic() != value) { + auto shapeType = getShapeType(); withWriteLock([&] { // 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) { _dynamic = false; _flags |= Simulation::DIRTY_MOTION_TYPE; From d0fc5c771377b30a627c2f729279325d199aeb92 Mon Sep 17 00:00:00 2001 From: Clement Date: Tue, 30 Apr 2019 18:29:00 -0700 Subject: [PATCH 2/2] Push protocol version --- libraries/networking/src/udt/PacketHeaders.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/networking/src/udt/PacketHeaders.h b/libraries/networking/src/udt/PacketHeaders.h index 1dafc561f6..30c102ca4f 100644 --- a/libraries/networking/src/udt/PacketHeaders.h +++ b/libraries/networking/src/udt/PacketHeaders.h @@ -269,6 +269,7 @@ enum class EntityVersion : PacketVersion { CertificateTypeProperty, DisableWebMedia, ParticleShapeType, + ParticleShapeTypeDeadlockFix, // Add new versions above here NUM_PACKET_TYPE,