Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 619 files). Show all
Unified · Split
| @@ -490,6 +490,8 @@ QUuid EntityScriptingInterface::addEntity(const EntityItemProperties& properties · 489 unmodified lines | ||
| 490 | 490 | |
| 491 | 491 | propertiesWithSimID.setLastEditedBy(sessionID); |
| 492 | 492 | |
| 493 | + propertiesWithSimID.setActionData(QByteArray()); | |
| 494 | + | |
| 493 | 495 | bool scalesWithParent = propertiesWithSimID.getScalesWithParent(); |
| 494 | 496 | |
| 495 | 497 | propertiesWithSimID = convertPropertiesFromScriptSemantics(propertiesWithSimID, scalesWithParent); |
| @@ -845,6 +847,8 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties& · 349 unmodified lines | ||
| 845 | 847 | } |
| 846 | 848 | properties.setOwningAvatarID(entity->getOwningAvatarID()); |
| 847 | 849 | |
| 850 | + properties.setActionData(entity->getDynamicData()); | |
| 851 | + | |
| 848 | 852 | // make sure the properties has a type, so that the encode can know which properties to include |
| 849 | 853 | properties.setType(entity->getType()); |
| 850 | 854 | |
| @@ -969,11 +973,6 @@ void EntityScriptingInterface::deleteEntity(QUuid id) { · 118 unmodified lines | ||
| 969 | 973 | const QUuid myNodeID = nodeList->getSessionUUID(); |
| 970 | 974 | if (entity->isAvatarEntity() && entity->getOwningAvatarID() != myNodeID) { |
| 971 | 975 | // don't delete other avatar's avatarEntities |
| 972 | − // If you actually own the entity but the onwership property is not set because of a domain switch | |
| 973 | − // The lines below makes sure the entity is deleted once its properties are set. | |
| 974 | − auto avatarHashMap = DependencyManager::get<AvatarHashMap>(); | |
| 975 | − AvatarSharedPointer myAvatar = avatarHashMap->getAvatarBySessionID(myNodeID); | |
| 976 | − myAvatar->insertDetachedEntityID(id); | |
| 977 | 976 | shouldSendDeleteToServer = false; |
| 978 | 977 | return; |
| 979 | 978 | } |