Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 39 files). Show all
Unified · Split
| @@ -24,8 +24,8 @@ · 23 unmodified lines | |||
| 24 | #include <model-networking/MeshProxy.h> | 24 | #include <model-networking/MeshProxy.h> |
| 25 | 25 | ||
| 26 | #include "EntitiesLogging.h" | 26 | #include "EntitiesLogging.h" |
| 27 | #include "EntityActionFactoryInterface.h" | 27 | #include "EntityDynamicFactoryInterface.h" |
| 28 | #include "EntityActionInterface.h" | 28 | #include "EntityDynamicInterface.h" |
| 29 | #include "EntitySimulation.h" | 29 | #include "EntitySimulation.h" |
| 30 | #include "EntityTree.h" | 30 | #include "EntityTree.h" |
| 31 | #include "LightEntityItem.h" | 31 | #include "LightEntityItem.h" |
| @@ -1133,7 +1133,7 @@ QUuid EntityScriptingInterface::addAction(const QString& actionTypeString, · 1101 unmodified lines | |||
| 1133 | PROFILE_RANGE(script_entities, __FUNCTION__); | 1133 | PROFILE_RANGE(script_entities, __FUNCTION__); |
| 1134 | 1134 | ||
| 1135 | QUuid actionID = QUuid::createUuid(); | 1135 | QUuid actionID = QUuid::createUuid(); |
| 1136 | auto actionFactory = DependencyManager::get<EntityActionFactoryInterface>(); | 1136 | auto actionFactory = DependencyManager::get<EntityDynamicFactoryInterface>(); |
| 1137 | bool success = false; | 1137 | bool success = false; |
| 1138 | actionWorker(entityID, [&](EntitySimulationPointer simulation, EntityItemPointer entity) { | 1138 | actionWorker(entityID, [&](EntitySimulationPointer simulation, EntityItemPointer entity) { |
| 1139 | // create this action even if the entity doesn't have physics info. it will often be the | 1139 | // create this action even if the entity doesn't have physics info. it will often be the |
| @@ -1142,11 +1142,11 @@ QUuid EntityScriptingInterface::addAction(const QString& actionTypeString, · 2 unmodified lines | |||
| 1142 | // if (!entity->getPhysicsInfo()) { | 1142 | // if (!entity->getPhysicsInfo()) { |
| 1143 | // return false; | 1143 | // return false; |
| 1144 | // } | 1144 | // } |
| 1145 | EntityActionType actionType = EntityActionInterface::actionTypeFromString(actionTypeString); | 1145 | EntityDynamicType dynamicType = EntityDynamicInterface::dynamicTypeFromString(actionTypeString); |
| 1146 | if (actionType == ACTION_TYPE_NONE) { | 1146 | if (dynamicType == DYNAMIC_TYPE_NONE) { |
| 1147 | return false; | 1147 | return false; |
| 1148 | } | 1148 | } |
| 1149 | EntityActionPointer action = actionFactory->factory(actionType, actionID, entity, arguments); | 1149 | EntityDynamicPointer action = actionFactory->factory(dynamicType, actionID, entity, arguments); |
| 1150 | if (!action) { | 1150 | if (!action) { |
| 1151 | return false; | 1151 | return false; |
| 1152 | } | 1152 | } |