mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge pull request #15487 from Atlante45/hotfix/deadlock
Case 22433: Query shape type outside lock
This commit is contained in:
commit
576f41f90c
2 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -269,6 +269,7 @@ enum class EntityVersion : PacketVersion {
|
|||
CertificateTypeProperty,
|
||||
DisableWebMedia,
|
||||
ParticleShapeType,
|
||||
ParticleShapeTypeDeadlockFix,
|
||||
|
||||
// Add new versions above here
|
||||
NUM_PACKET_TYPE,
|
||||
|
|
Loading…
Reference in a new issue