diff --git a/AutoMark/scripts/mods/AutoMark/mark/servo_skull_mark.lua b/AutoMark/scripts/mods/AutoMark/mark/servo_skull_mark.lua index dc8111a..2311a55 100644 --- a/AutoMark/scripts/mods/AutoMark/mark/servo_skull_mark.lua +++ b/AutoMark/scripts/mods/AutoMark/mark/servo_skull_mark.lua @@ -79,7 +79,7 @@ local function ensure_automark_tag_hook() return orig_set_tag(self, template_name, tagger_unit, target_unit, target_location) end rawset(smart_tag_system, "set_tag", patched.set_tag) - patched.set_tag.omni_hook_marker = true + mod.omni_hack_patched_fn = patched.set_tag mod.omni_hack_patched_sys = smart_tag_system if mod_settings.debug_mode then mod:diag("OMNI-HACK-DIAG set_tag instance-shadow INSTALLED marker=", tostring(rawget(smart_tag_system, "set_tag") == patched.set_tag)) @@ -395,11 +395,7 @@ function mod:auto_hack(dt, t, fixed_frame) end if mod_settings.debug_mode and not mod.omni_hack_ptr_logged then mod.omni_hack_ptr_logged = true - local marker - pcall(function() - marker = smart_tag_system.set_tag.omni_hook_marker - end) - mod:diag("OMNI-HACK-DIAG call-site marker_on_calling_fn=", tostring(marker), " hook_calls_before_this=", tostring(mod.omni_hack_hook_count)) + mod:diag("OMNI-HACK-DIAG call-site shadow_on_instance=", tostring(rawget(smart_tag_system, "set_tag") == mod.omni_hack_patched_fn), " hook_calls_before_this=", tostring(mod.omni_hack_hook_count)) end local target_tag = smart_tag_system:unit_tag(target_unit)