From 60b5dc4dc3590eb4873c57bfaab5e9a32bcf9b68 Mon Sep 17 00:00:00 2001 From: tristan Date: Mon, 3 Sep 2018 00:03:52 +0200 Subject: [PATCH] UPBGE: Fix scene replacement. The commit f62dca6f3c80 introduced a remove of the replaced scene in the scene list, this call is unnecessary as EXP_ListValue::SetValue is swapping the values. The drawback of RemoveValue was to reduce the size of the container by actually erasing the item. This is fixed by not removing the scene but only replacing its pointer. Fix issue: #819. --- source/gameengine/Ketsji/KX_KetsjiEngine.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index 80f5fba3d4b0..bec1878af22e 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -1397,7 +1397,6 @@ void KX_KetsjiEngine::ReplaceScheduledScenes() Scene *blScene = m_converter->GetBlenderSceneForName(newscenename); if (blScene) { DestructScene(scene); - m_scenes->RemoveValue(scene); KX_Scene *tmpscene = CreateScene(blScene); ConvertScene(tmpscene);