mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 05:17:02 +02:00
CR and fix deadlock
This commit is contained in:
parent
b418e43ef2
commit
3f8bfc5475
6 changed files with 8 additions and 12 deletions
|
@ -1900,11 +1900,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
connect(pointerManager.data(), &PointerManager::triggerBeginOverlay, keyboardFocusOperator);
|
connect(pointerManager.data(), &PointerManager::triggerBeginOverlay, keyboardFocusOperator);
|
||||||
|
|
||||||
auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>();
|
auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>();
|
||||||
connect(entityScriptingInterface.data(), &EntityScriptingInterface::deletingEntity, [this](const EntityItemID& entityItemID) {
|
connect(entityScriptingInterface.data(), &EntityScriptingInterface::deletingEntity, this, [this](const EntityItemID& entityItemID) {
|
||||||
if (entityItemID == _keyboardFocusedEntity.get()) {
|
if (entityItemID == _keyboardFocusedEntity.get()) {
|
||||||
setKeyboardFocusEntity(UNKNOWN_ENTITY_ID);
|
setKeyboardFocusEntity(UNKNOWN_ENTITY_ID);
|
||||||
}
|
}
|
||||||
});
|
}, Qt::QueuedConnection);
|
||||||
|
|
||||||
EntityTree::setAddMaterialToEntityOperator([this](const QUuid& entityID, graphics::MaterialLayer material, const std::string& parentMaterialName) {
|
EntityTree::setAddMaterialToEntityOperator([this](const QUuid& entityID, graphics::MaterialLayer material, const std::string& parentMaterialName) {
|
||||||
if (_aboutToQuit) {
|
if (_aboutToQuit) {
|
||||||
|
|
|
@ -310,7 +310,7 @@ void StartEndRenderState::update(const glm::vec3& origin, const glm::vec3& end,
|
||||||
EntityItemProperties properties;
|
EntityItemProperties properties;
|
||||||
EntityPropertyFlags desiredProperties;
|
EntityPropertyFlags desiredProperties;
|
||||||
desiredProperties += PROP_DIMENSIONS;
|
desiredProperties += PROP_DIMENSIONS;
|
||||||
glm::vec3 dim = entityScriptingInterface->getEntityProperties(getEndID(), desiredProperties).getDimensions();
|
glm::vec3 dim;
|
||||||
if (distanceScaleEnd) {
|
if (distanceScaleEnd) {
|
||||||
dim = getEndDim() * glm::distance(origin, end);
|
dim = getEndDim() * glm::distance(origin, end);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -242,7 +242,7 @@ void PolyLineEntityRenderer::updateGeometry() {
|
||||||
binormal = glm::normalize(glm::cross(tangent, normal));
|
binormal = glm::normalize(glm::cross(tangent, normal));
|
||||||
|
|
||||||
// Check to make sure binormal is not a NAN. If it is, don't add to vertices vector
|
// Check to make sure binormal is not a NAN. If it is, don't add to vertices vector
|
||||||
if (binormal.x != binormal.x) {
|
if (glm::any(glm::isnan(binormal))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1927,7 +1927,7 @@ QScriptValue EntityItemProperties::copyToScriptValue(QScriptEngine* engine, bool
|
||||||
properties.setProperty("localEntity", convertScriptValue(engine, getEntityHostType() == entity::HostType::LOCAL));
|
properties.setProperty("localEntity", convertScriptValue(engine, getEntityHostType() == entity::HostType::LOCAL));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!psuedoPropertyFlagsActive || psueudoPropertyFlags.test(EntityPsuedoPropertyFlag::FaceCamera)) && _type != EntityTypes::PolyLine) {
|
if (_type != EntityTypes::PolyLine && (!psuedoPropertyFlagsActive || psueudoPropertyFlags.test(EntityPsuedoPropertyFlag::FaceCamera))) {
|
||||||
properties.setProperty("faceCamera", convertScriptValue(engine, getBillboardMode() == BillboardMode::YAW));
|
properties.setProperty("faceCamera", convertScriptValue(engine, getBillboardMode() == BillboardMode::YAW));
|
||||||
}
|
}
|
||||||
if (!psuedoPropertyFlagsActive || psueudoPropertyFlags.test(EntityPsuedoPropertyFlag::IsFacingAvatar)) {
|
if (!psuedoPropertyFlagsActive || psueudoPropertyFlags.test(EntityPsuedoPropertyFlag::IsFacingAvatar)) {
|
||||||
|
|
|
@ -151,7 +151,7 @@ bool EntityTreeElement::checkFilterSettings(const EntityItemPointer& entity, Pic
|
||||||
// We only check the collidable filters for non-local entities, because local entities are always collisionless
|
// We only check the collidable filters for non-local entities, because local entities are always collisionless
|
||||||
bool collidable = !entity->getCollisionless() && (entity->getShapeType() != SHAPE_TYPE_NONE);
|
bool collidable = !entity->getCollisionless() && (entity->getShapeType() != SHAPE_TYPE_NONE);
|
||||||
if (hostType != entity::HostType::LOCAL) {
|
if (hostType != entity::HostType::LOCAL) {
|
||||||
if ((!searchFilter.doesPickCollidable() && collidable) || (!searchFilter.doesPickNonCollidable() && !collidable)) {
|
if ((collidable && !searchFilter.doesPickCollidable()) || (!collidable && !searchFilter.doesPickNonCollidable())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -304,15 +304,11 @@ WebInputMode WebEntityItem::getInputMode() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebEntityItem::setShowKeyboardFocusHighlight(bool value) {
|
void WebEntityItem::setShowKeyboardFocusHighlight(bool value) {
|
||||||
withWriteLock([&] {
|
_showKeyboardFocusHighlight = value;
|
||||||
_showKeyboardFocusHighlight = value;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WebEntityItem::getShowKeyboardFocusHighlight() const {
|
bool WebEntityItem::getShowKeyboardFocusHighlight() const {
|
||||||
return resultWithReadLock<bool>([&] {
|
return _showKeyboardFocusHighlight;
|
||||||
return _showKeyboardFocusHighlight;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PulsePropertyGroup WebEntityItem::getPulseProperties() const {
|
PulsePropertyGroup WebEntityItem::getPulseProperties() const {
|
||||||
|
|
Loading…
Reference in a new issue