only set simulationID on scripted entity creation if the entity has velocity or rotation

This commit is contained in:
Seth Alves 2015-04-14 10:17:54 -07:00
parent d330319ed9
commit b5bfbba759

View file

@ -68,10 +68,13 @@ EntityItemID EntityScriptingInterface::addEntity(const EntityItemProperties& pro
// This Node is creating a new object. If it's in motion, set this Node as the simulator.
auto nodeList = DependencyManager::get<NodeList>();
const QString myNodeID = nodeList->getSessionUUID().toString();
// QString simulatorID = _entity->getSimulatorID();
EntityItemProperties propertiesWithSimID = properties;
propertiesWithSimID.setSimulatorID(myNodeID);
// if this object is moving, set this Node as the simulation owner
if (properties.velocityChanged() || properties.rotationChanged()) {
propertiesWithSimID.setSimulatorID(myNodeID);
}
EntityItemID id(NEW_ENTITY, creatorTokenID, false );