mirror of
https://github.com/lubosz/overte.git
synced 2025-04-26 09:35:31 +02:00
Query shape type outside lock
This commit is contained in:
parent
4821e745cc
commit
281f92e3ea
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