another approach

This commit is contained in:
ZappoMan 2015-04-01 14:38:01 -07:00
parent aac824fb99
commit d7188bac0b

View file

@ -81,6 +81,7 @@ void EntityTreeRenderer::clear() {
}
OctreeRenderer::clear();
_entityScripts.clear();
_entitiesScriptEngine->disconnect();
}
void EntityTreeRenderer::init() {
@ -969,10 +970,6 @@ void EntityTreeRenderer::checkAndCallUnload(const EntityItemID& entityID) {
QScriptValueList entityArgs = createEntityArgs(entityID);
entityScript.property("unload").call(entityScript, entityArgs);
}
// In the event that the entity script connected to any of our signals
// we want to disconnect it so we don't have anything dangling
_entitiesScriptEngine->disconnect(entityScript.toQObject());
}
}