From 681b865f03520ee8f7ddc3e19c09c0f4df5bad8b Mon Sep 17 00:00:00 2001 From: GreenComfyTea Date: Sun, 6 Aug 2023 12:13:48 +0300 Subject: [PATCH] Create missing small monster entries in draw function --- .../autorun/MHR_Overlay/UI/Modules/small_monster_UI.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/reframework/autorun/MHR_Overlay/UI/Modules/small_monster_UI.lua b/reframework/autorun/MHR_Overlay/UI/Modules/small_monster_UI.lua index 25a55ca..1563875 100644 --- a/reframework/autorun/MHR_Overlay/UI/Modules/small_monster_UI.lua +++ b/reframework/autorun/MHR_Overlay/UI/Modules/small_monster_UI.lua @@ -69,16 +69,20 @@ function this.draw() goto continue; end - local monster = small_monster.list[enemy]; + local monster = small_monster.get_monster(enemy); if monster == nil then - error_handler.report("small_monster_UI.draw", "Missing Entry: monster No. " .. tostring(i)); + error_handler.report("small_monster_UI.draw", "Failed to Create Small Monster Entry No. " .. tostring(i)); goto continue; end + -- causes VMContext corruption and call failures + --for enemy, monster in pairs(small_monster.list) do if monster.dead_or_captured and cached_config.settings.hide_dead_or_captured then goto continue; end; + small_monster.update_position(enemy, monster); + table.insert(displayed_monsters, monster); ::continue:: end