3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-26 21:55:25 +02:00

Create and destroy ScriptModel on its owning thread

QFileSystemWatcher, a component, must be destroyed on
the thread that created it.
This commit is contained in:
Simon Walton 2018-06-27 16:46:45 -07:00
parent b7069fff71
commit 7270ab9078

View file

@ -68,9 +68,6 @@ EntityScriptServer::EntityScriptServer(ReceivedMessage& message) : ThreadedAssig
DependencyManager::set<AudioInjectorManager>();
DependencyManager::set<ScriptCache>();
DependencyManager::set<ScriptEngines>(ScriptEngine::ENTITY_SERVER_SCRIPT);
DependencyManager::set<EntityScriptServerServices>();
// Needed to ensure the creation of the DebugDraw instance on the main thread
@ -253,6 +250,9 @@ void EntityScriptServer::handleEntityScriptCallMethodPacket(QSharedPointer<Recei
void EntityScriptServer::run() {
DependencyManager::set<ScriptEngines>(ScriptEngine::ENTITY_SERVER_SCRIPT);
DependencyManager::set<EntityScriptServerServices>();
// make sure we request our script once the agent connects to the domain
auto nodeList = DependencyManager::get<NodeList>();