mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +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) {
|
||||
EntityItemID newID = getMapped(item->getEntityItemID());
|
||||
EntityItemID oldID = item->getEntityItemID();
|
||||
EntityItemID newID = getMapped(oldID);
|
||||
EntityItemProperties properties = item->getProperties();
|
||||
|
||||
EntityItemID oldParentID = properties.getParentID();
|
||||
|
|
|
@ -178,11 +178,9 @@ bool ObjectConstraintBallSocket::updateArguments(QVariantMap arguments) {
|
|||
QVariantMap ObjectConstraintBallSocket::getArguments() {
|
||||
QVariantMap arguments = ObjectDynamic::getArguments();
|
||||
withReadLock([&] {
|
||||
if (_constraint) {
|
||||
arguments["pivot"] = glmToQMap(_pivotInA);
|
||||
arguments["otherEntityID"] = _otherID;
|
||||
arguments["otherPivot"] = glmToQMap(_pivotInB);
|
||||
}
|
||||
arguments["pivot"] = glmToQMap(_pivotInA);
|
||||
arguments["otherEntityID"] = _otherID;
|
||||
arguments["otherPivot"] = glmToQMap(_pivotInB);
|
||||
});
|
||||
return arguments;
|
||||
}
|
||||
|
|
|
@ -35,8 +35,9 @@ void ObjectDynamic::remapIDs(QHash<EntityItemID, EntityItemID>& map) {
|
|||
QHash<EntityItemID, EntityItemID>::iterator iter = map.find(_otherID);
|
||||
if (iter == map.end()) {
|
||||
// not found, add it
|
||||
QUuid oldOtherID = _otherID;
|
||||
_otherID = QUuid::createUuid();
|
||||
map.insert(_otherID, _otherID);
|
||||
map.insert(oldOtherID, _otherID);
|
||||
} else {
|
||||
_otherID = iter.value();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue