mirror of
https://github.com/lubosz/overte.git
synced 2025-04-16 14:16:36 +02:00
clear the skybox between scenes
This commit is contained in:
parent
5e82093e69
commit
996346980d
1 changed files with 8 additions and 2 deletions
|
@ -113,17 +113,19 @@ void EntityTreeRenderer::resetEntitiesScriptEngine() {
|
|||
void EntityTreeRenderer::clear() {
|
||||
leaveAllEntities();
|
||||
|
||||
// unload and stop the engine
|
||||
if (_entitiesScriptEngine) {
|
||||
// Unload and stop the engine here (instead of in its deleter) to
|
||||
// avoid marshalling unload signals back to this thread
|
||||
// do this here (instead of in deleter) to avoid marshalling unload signals back to this thread
|
||||
_entitiesScriptEngine->unloadAllEntityScripts();
|
||||
_entitiesScriptEngine->stop();
|
||||
}
|
||||
|
||||
// reset the engine
|
||||
if (_wantScripts && !_shuttingDown) {
|
||||
resetEntitiesScriptEngine();
|
||||
}
|
||||
|
||||
// remove all entities from the scene
|
||||
auto scene = _viewState->getMain3DScene();
|
||||
render::PendingChanges pendingChanges;
|
||||
foreach(auto entity, _entitiesInScene) {
|
||||
|
@ -132,6 +134,10 @@ void EntityTreeRenderer::clear() {
|
|||
scene->enqueuePendingChanges(pendingChanges);
|
||||
_entitiesInScene.clear();
|
||||
|
||||
// reset the zone to the default (while we load the next scene)
|
||||
_bestZone = nullptr;
|
||||
applyZonePropertiesToScene(_bestZone);
|
||||
|
||||
OctreeRenderer::clear();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue