mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Query shape type outside lock
This commit is contained in:
parent
6352c66e6b
commit
099e04f7bb
1 changed files with 2 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;
|
||||
|
|
Loading…
Reference in a new issue