mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 04:37:48 +02:00
fix constraint import some more
This commit is contained in:
parent
bc6fb182eb
commit
630d95a812
3 changed files with 7 additions and 7 deletions
|
@ -1622,7 +1622,8 @@ bool EntityTree::sendEntitiesOperation(OctreeElementPointer element, void* extra
|
||||||
};
|
};
|
||||||
|
|
||||||
entityTreeElement->forEachEntity([&args, &getMapped, &element](EntityItemPointer item) {
|
entityTreeElement->forEachEntity([&args, &getMapped, &element](EntityItemPointer item) {
|
||||||
EntityItemID newID = getMapped(item->getEntityItemID());
|
EntityItemID oldID = item->getEntityItemID();
|
||||||
|
EntityItemID newID = getMapped(oldID);
|
||||||
EntityItemProperties properties = item->getProperties();
|
EntityItemProperties properties = item->getProperties();
|
||||||
|
|
||||||
EntityItemID oldParentID = properties.getParentID();
|
EntityItemID oldParentID = properties.getParentID();
|
||||||
|
|
|
@ -178,11 +178,9 @@ bool ObjectConstraintBallSocket::updateArguments(QVariantMap arguments) {
|
||||||
QVariantMap ObjectConstraintBallSocket::getArguments() {
|
QVariantMap ObjectConstraintBallSocket::getArguments() {
|
||||||
QVariantMap arguments = ObjectDynamic::getArguments();
|
QVariantMap arguments = ObjectDynamic::getArguments();
|
||||||
withReadLock([&] {
|
withReadLock([&] {
|
||||||
if (_constraint) {
|
arguments["pivot"] = glmToQMap(_pivotInA);
|
||||||
arguments["pivot"] = glmToQMap(_pivotInA);
|
arguments["otherEntityID"] = _otherID;
|
||||||
arguments["otherEntityID"] = _otherID;
|
arguments["otherPivot"] = glmToQMap(_pivotInB);
|
||||||
arguments["otherPivot"] = glmToQMap(_pivotInB);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
return arguments;
|
return arguments;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,8 +35,9 @@ void ObjectDynamic::remapIDs(QHash<EntityItemID, EntityItemID>& map) {
|
||||||
QHash<EntityItemID, EntityItemID>::iterator iter = map.find(_otherID);
|
QHash<EntityItemID, EntityItemID>::iterator iter = map.find(_otherID);
|
||||||
if (iter == map.end()) {
|
if (iter == map.end()) {
|
||||||
// not found, add it
|
// not found, add it
|
||||||
|
QUuid oldOtherID = _otherID;
|
||||||
_otherID = QUuid::createUuid();
|
_otherID = QUuid::createUuid();
|
||||||
map.insert(_otherID, _otherID);
|
map.insert(oldOtherID, _otherID);
|
||||||
} else {
|
} else {
|
||||||
_otherID = iter.value();
|
_otherID = iter.value();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue