fix: Lua functions don't accept ad-hoc fields — dropped the marker stamp that threw every hack tick (safe_hook spam, 412x); call-site check now compares rawset identity against stored patched fn ref
This commit is contained in:
@@ -79,7 +79,7 @@ local function ensure_automark_tag_hook()
|
|||||||
return orig_set_tag(self, template_name, tagger_unit, target_unit, target_location)
|
return orig_set_tag(self, template_name, tagger_unit, target_unit, target_location)
|
||||||
end
|
end
|
||||||
rawset(smart_tag_system, "set_tag", patched.set_tag)
|
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
|
mod.omni_hack_patched_sys = smart_tag_system
|
||||||
if mod_settings.debug_mode then
|
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))
|
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
|
end
|
||||||
if mod_settings.debug_mode and not mod.omni_hack_ptr_logged then
|
if mod_settings.debug_mode and not mod.omni_hack_ptr_logged then
|
||||||
mod.omni_hack_ptr_logged = true
|
mod.omni_hack_ptr_logged = true
|
||||||
local marker
|
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))
|
||||||
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))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local target_tag = smart_tag_system:unit_tag(target_unit)
|
local target_tag = smart_tag_system:unit_tag(target_unit)
|
||||||
|
|||||||
Reference in New Issue
Block a user