Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 23 files). Show all
Unified · Split
| @@ -766,7 +766,7 @@ bool EntityScriptingInterface::appendPoint(QUuid entityID, const glm::vec3& poin · 765 unmodified lines | ||
| 766 | 766 | |
| 767 | 767 | |
| 768 | 768 | bool EntityScriptingInterface::actionWorker(const QUuid& entityID, |
| 769 | − std::function<bool(EntitySimulation*, EntityItemPointer)> actor) { | |
| 769 | + std::function<bool(EntitySimulationPointer, EntityItemPointer)> actor) { | |
| 770 | 770 | if (!_entityTree) { |
| 771 | 771 | return false; |
| 772 | 772 | } |
| @@ -774,7 +774,7 @@ bool EntityScriptingInterface::actionWorker(const QUuid& entityID, · 1 unmodified line | ||
| 774 | 774 | EntityItemPointer entity; |
| 775 | 775 | bool doTransmit = false; |
| 776 | 776 | _entityTree->withWriteLock([&] { |
| 777 | − EntitySimulation* simulation = _entityTree->getSimulation(); | |
| 777 | + EntitySimulationPointer simulation = _entityTree->getSimulation(); | |
| 778 | 778 | entity = _entityTree->findEntityByEntityItemID(entityID); |
| 779 | 779 | if (!entity) { |
| 780 | 780 | qDebug() << "actionWorker -- unknown entity" << entityID; |
| @@ -815,7 +815,7 @@ QUuid EntityScriptingInterface::addAction(const QString& actionTypeString, · 34 unmodified lines | ||
| 815 | 815 | QUuid actionID = QUuid::createUuid(); |
| 816 | 816 | auto actionFactory = DependencyManager::get<EntityActionFactoryInterface>(); |
| 817 | 817 | bool success = false; |
| 818 | − actionWorker(entityID, [&](EntitySimulation* simulation, EntityItemPointer entity) { | |
| 818 | + actionWorker(entityID, [&](EntitySimulationPointer simulation, EntityItemPointer entity) { | |
| 819 | 819 | // create this action even if the entity doesn't have physics info. it will often be the |
| 820 | 820 | // case that a script adds an action immediately after an object is created, and the physicsInfo |
| 821 | 821 | // is computed asynchronously. |
| @@ -843,7 +843,7 @@ QUuid EntityScriptingInterface::addAction(const QString& actionTypeString, · 21 unmodified lines | ||
| 843 | 843 | |
| 844 | 844 | |
| 845 | 845 | bool EntityScriptingInterface::updateAction(const QUuid& entityID, const QUuid& actionID, const QVariantMap& arguments) { |
| 846 | − return actionWorker(entityID, [&](EntitySimulation* simulation, EntityItemPointer entity) { | |
| 846 | + return actionWorker(entityID, [&](EntitySimulationPointer simulation, EntityItemPointer entity) { | |
| 847 | 847 | bool success = entity->updateAction(simulation, actionID, arguments); |
| 848 | 848 | if (success) { |
| 849 | 849 | entity->grabSimulationOwnership(); |
| @@ -854,7 +854,7 @@ bool EntityScriptingInterface::updateAction(const QUuid& entityID, const QUuid& · 4 unmodified lines | ||
| 854 | 854 | |
| 855 | 855 | bool EntityScriptingInterface::deleteAction(const QUuid& entityID, const QUuid& actionID) { |
| 856 | 856 | bool success = false; |
| 857 | − actionWorker(entityID, [&](EntitySimulation* simulation, EntityItemPointer entity) { | |
| 857 | + actionWorker(entityID, [&](EntitySimulationPointer simulation, EntityItemPointer entity) { | |
| 858 | 858 | success = entity->removeAction(simulation, actionID); |
| 859 | 859 | if (success) { |
| 860 | 860 | // reduce from grab to poke |
| @@ -867,7 +867,7 @@ bool EntityScriptingInterface::deleteAction(const QUuid& entityID, const QUuid& · 6 unmodified lines | ||
| 867 | 867 | |
| 868 | 868 | QVector<QUuid> EntityScriptingInterface::getActionIDs(const QUuid& entityID) { |
| 869 | 869 | QVector<QUuid> result; |
| 870 | − actionWorker(entityID, [&](EntitySimulation* simulation, EntityItemPointer entity) { | |
| 870 | + actionWorker(entityID, [&](EntitySimulationPointer simulation, EntityItemPointer entity) { | |
| 871 | 871 | QList<QUuid> actionIDs = entity->getActionIDs(); |
| 872 | 872 | result = QVector<QUuid>::fromList(actionIDs); |
| 873 | 873 | return false; // don't send an edit packet |
| @@ -877,7 +877,7 @@ QVector<QUuid> EntityScriptingInterface::getActionIDs(const QUuid& entityID) { · 3 unmodified lines | ||
| 877 | 877 | |
| 878 | 878 | QVariantMap EntityScriptingInterface::getActionArguments(const QUuid& entityID, const QUuid& actionID) { |
| 879 | 879 | QVariantMap result; |
| 880 | − actionWorker(entityID, [&](EntitySimulation* simulation, EntityItemPointer entity) { | |
| 880 | + actionWorker(entityID, [&](EntitySimulationPointer simulation, EntityItemPointer entity) { | |
| 881 | 881 | result = entity->getActionArguments(actionID); |
| 882 | 882 | return false; // don't send an edit packet |
| 883 | 883 | }); |