Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 23 files). Show all
Unified · Split
| @@ -90,8 +90,6 @@ EntityItemProperties EntityScriptingInterface::getEntityProperties(EntityItemID · 89 unmodified lines | ||
| 90 | 90 | return results; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | − | |
| 94 | − | |
| 95 | 93 | EntityItemID EntityScriptingInterface::editEntity(EntityItemID entityID, const EntityItemProperties& properties) { |
| 96 | 94 | EntityItemID actualID = entityID; |
| 97 | 95 | |
| @@ -104,7 +102,6 @@ EntityItemID EntityScriptingInterface::editEntity(EntityItemID entityID, const E · 6 unmodified lines | ||
| 104 | 102 | if (actualID.id != UNKNOWN_ENTITY_ID) { |
| 105 | 103 | entityID.id = actualID.id; |
| 106 | 104 | entityID.isKnownID = true; |
| 107 | − //qDebug() << "EntityScriptingInterface::editEntity()... isKnownID=" << entityID.isKnownID << "id=" << entityID.id << "creatorTokenID=" << entityID.creatorTokenID; | |
| 108 | 105 | queueEntityMessage(PacketTypeEntityAddOrEdit, entityID, properties); |
| 109 | 106 | } |
| 110 | 107 | |
| @@ -112,19 +109,12 @@ EntityItemID EntityScriptingInterface::editEntity(EntityItemID entityID, const E · 1 unmodified line | ||
| 112 | 109 | // the actual id, because we can edit out local models just with creatorTokenID |
| 113 | 110 | if (_entityTree) { |
| 114 | 111 | _entityTree->lockForWrite(); |
| 115 | − //qDebug() << "EntityScriptingInterface::editEntity() ******* START _entityTree->updateEntity()..."; | |
| 116 | 112 | _entityTree->updateEntity(entityID, properties); |
| 117 | − //qDebug() << "EntityScriptingInterface::editEntity() ******* DONE _entityTree->updateEntity()..."; | |
| 118 | 113 | _entityTree->unlock(); |
| 119 | 114 | } |
| 120 | 115 | return entityID; |
| 121 | 116 | } |
| 122 | 117 | |
| 123 | − | |
| 124 | −// TODO: This deleteEntity() method uses the PacketTypeEntityAddOrEdit message to send | |
| 125 | −// a changed model with a shouldDie() property set to true. This works and is currently the only | |
| 126 | −// way to tell the model server to delete a model. But we should change this to use the PacketTypeEntityErase | |
| 127 | −// message which takes a list of model id's to delete. | |
| 128 | 118 | void EntityScriptingInterface::deleteEntity(EntityItemID entityID) { |
| 129 | 119 | |
| 130 | 120 | EntityItemID actualID = entityID; |
| @@ -220,10 +210,6 @@ RayToEntityIntersectionResult EntityScriptingInterface::findRayIntersectionWorke · 89 unmodified lines | ||
| 220 | 210 | result.intersects = _entityTree->findRayIntersection(ray.origin, ray.direction, element, result.distance, result.face, |
| 221 | 211 | (void**)&intersectedEntity, lockType, &result.accurate); |
| 222 | 212 | if (result.intersects && intersectedEntity) { |
| 223 | − | |
| 224 | − //qDebug() << "findRayIntersectionWorker().... intersectedEntity=" << intersectedEntity; | |
| 225 | − //intersectedEntity->debugDump(); | |
| 226 | − | |
| 227 | 213 | result.entityID = intersectedEntity->getEntityItemID(); |
| 228 | 214 | result.properties = intersectedEntity->getProperties(); |
| 229 | 215 | result.intersection = ray.origin + (ray.direction * result.distance); |