Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 15 files). Show all
Unified · Split
| @@ -123,10 +123,6 @@ EntityItemID EntityScriptingInterface::editEntity(EntityItemID entityID, const E · 122 unmodified lines | ||
| 123 | 123 | // message which takes a list of model id's to delete. |
| 124 | 124 | void EntityScriptingInterface::deleteEntity(EntityItemID entityID) { |
| 125 | 125 | |
| 126 | − // setup properties to kill the model | |
| 127 | − EntityItemProperties properties; | |
| 128 | − properties.setShouldBeDeleted(true); | |
| 129 | − | |
| 130 | 126 | EntityItemID actualID = entityID; |
| 131 | 127 | |
| 132 | 128 | // if the model is unknown, attempt to look it up |
| @@ -138,8 +134,13 @@ void EntityScriptingInterface::deleteEntity(EntityItemID entityID) { · 5 unmodified lines | ||
| 138 | 134 | if (actualID.id != UNKNOWN_ENTITY_ID) { |
| 139 | 135 | entityID.id = actualID.id; |
| 140 | 136 | entityID.isKnownID = true; |
| 141 | − //qDebug() << "EntityScriptingInterface::deleteEntity()... isKnownID=" << entityID.isKnownID << "id=" << entityID.id << "creatorTokenID=" << entityID.creatorTokenID; | |
| 142 | − queueEntityMessage(PacketTypeEntityAddOrEdit, entityID, properties); | |
| 137 | + | |
| 138 | + qDebug() << "EntityScriptingInterface::deleteEntity()... " | |
| 139 | + << "isKnownID=" << entityID.isKnownID | |
| 140 | + << "id=" << entityID.id | |
| 141 | + << "creatorTokenID=" << entityID.creatorTokenID; | |
| 142 | + | |
| 143 | + getEntityPacketSender()->queueEraseEntityMessage(entityID); | |
| 143 | 144 | } |
| 144 | 145 | |
| 145 | 146 | // If we have a local model tree set, then also update it. |