History

Merge pull request #12991 from luiscuenca/avatarScript

Avatar Scripts

John Conklin II committed 8 years ago

Commit 7a5fce42 parents 83d370f 689fbd216 files · +177 −9Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 16 files). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+15−0
@@ -180,6 +180,21 @@ ScriptEngine::ScriptEngine(Context context, const QString& scriptContents, const · 179 unmodified lines
180180 // don't delete `ScriptEngines` until all `ScriptEngine`s are gone
181181 _scriptEngines(DependencyManager::get<ScriptEngines>())
182182 {
183+ switch (_context) {
184+ case Context::CLIENT_SCRIPT:
185+ _type = Type::CLIENT;
186+ break;
187+ case Context::ENTITY_CLIENT_SCRIPT:
188+ _type = Type::ENTITY_CLIENT;
189+ break;
190+ case Context::ENTITY_SERVER_SCRIPT:
191+ _type = Type::ENTITY_SERVER;
192+ break;
193+ case Context::AGENT_SCRIPT:
194+ _type = Type::AGENT;
195+ break;
196+ }
197+
183198 connect(this, &QScriptEngine::signalHandlerException, this, [this](const QScriptValue& exception) {
184199 if (hasUncaughtException()) {
185200 // the engine's uncaughtException() seems to produce much better stack traces here