From 5c29dbfbca10d9c6fe46e64fc4bee6af4905278d Mon Sep 17 00:00:00 2001 From: ajanhallinta <4janhallinta@gmail.com> Date: Sun, 29 May 2022 02:50:54 +0300 Subject: [PATCH] Update actor list when changing scene --- soh/soh/Enhancements/debugger/actorViewer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/soh/soh/Enhancements/debugger/actorViewer.cpp b/soh/soh/Enhancements/debugger/actorViewer.cpp index 36fa5f1fe..21a69b93e 100644 --- a/soh/soh/Enhancements/debugger/actorViewer.cpp +++ b/soh/soh/Enhancements/debugger/actorViewer.cpp @@ -1065,6 +1065,7 @@ void DrawActorViewer(bool& open) { static ActorInfo newActor = {0,0, {0, 0, 0}, {0, 0, 0}}; static ActorOverlay* dispOverlay; static std::string filler = "Please select"; + static u16 lastSceneId = 0; if (ImGui::BeginCombo("Actor Type", acMapping[category].c_str())) { for (int i = 0; i < acMapping.size(); i++) { @@ -1078,6 +1079,10 @@ void DrawActorViewer(bool& open) { } if (ImGui::BeginCombo("Actor", filler.c_str())) { + if (gGlobalCtx != nullptr && lastSceneId != gGlobalCtx->sceneNum) { + list = PopulateActorDropdown(category, list); + lastSceneId = gGlobalCtx->sceneNum; + } for (int i = 0; i < list.size(); i++) { std::string label = std::to_string(i) + ": " + list[i]->overlayEntry->name; std::string description = GetActorDescription(list[i]->id);