Merge pull request #12462 from SamGondelman/entityDelete

Fix EntityItems not getting destroyed
This commit is contained in:
Sam Gondelman 2018-02-23 16:17:52 -08:00 committed by GitHub
commit e10af9b83d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -17,6 +17,8 @@
#include "SceneScriptingInterface.h"
OctreePacketProcessor::OctreePacketProcessor() {
setObjectName("Octree Packet Processor");
auto& packetReceiver = DependencyManager::get<NodeList>()->getPacketReceiver();
packetReceiver.registerDirectListenerForTypes({ PacketType::OctreeStats, PacketType::EntityData, PacketType::EntityErase },

View file

@ -97,6 +97,7 @@ EntityItemPointer EntityTypes::constructEntityItem(EntityType entityType, const
auto mutableProperties = properties;
mutableProperties.markAllChanged();
newEntityItem = factory(entityID, mutableProperties);
newEntityItem->moveToThread(qApp->thread());
}
return newEntityItem;
}