Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -389,7 +389,7 @@ bool EntityScriptingInterface::setVoxelSphere(QUuid entityID, const glm::vec3& c · 388 unmodified lines | |||
| 389 | return false; | 389 | return false; |
| 390 | } | 390 | } |
| 391 | 391 | ||
| 392 | EntityItem* entity = const_cast<EntityItem*>(_entityTree->findEntityByEntityItemID(entityID)); | 392 | EntityItemPointer entity = static_cast<EntityItemPointer>(_entityTree->findEntityByEntityItemID(entityID)); |
| 393 | if (!entity) { | 393 | if (!entity) { |
| 394 | qCDebug(entities) << "EntityScriptingInterface::setVoxelSphere no entity with ID" << entityID; | 394 | qCDebug(entities) << "EntityScriptingInterface::setVoxelSphere no entity with ID" << entityID; |
| 395 | return false; | 395 | return false; |
| @@ -402,7 +402,7 @@ bool EntityScriptingInterface::setVoxelSphere(QUuid entityID, const glm::vec3& c · 6 unmodified lines | |||
| 402 | 402 | ||
| 403 | auto now = usecTimestampNow(); | 403 | auto now = usecTimestampNow(); |
| 404 | 404 | ||
| 405 | PolyVoxEntityItem* polyVoxEntity = static_cast<PolyVoxEntityItem*>(entity); | 405 | PolyVoxEntityItem* polyVoxEntity = static_cast<PolyVoxEntityItem*>(entity.get()); |
| 406 | _entityTree->lockForWrite(); | 406 | _entityTree->lockForWrite(); |
| 407 | polyVoxEntity->setSphere(center, radius, value); | 407 | polyVoxEntity->setSphere(center, radius, value); |
| 408 | entity->setLastEdited(now); | 408 | entity->setLastEdited(now); |