diff --git a/src/outline/outline.zig b/src/outline/outline.zig index e75d84d..878529f 100644 --- a/src/outline/outline.zig +++ b/src/outline/outline.zig @@ -9,6 +9,7 @@ const logging = @import("../logging.zig"); const tracker = @import("tracker.zig"); const model_hook = @import("model_hook.zig"); const d3d9_hook = @import("d3d9_hook.zig"); +const wow = @import("../wow.zig"); const WINAPI = std.builtin.CallingConvention.winapi; const mod_mutex = @import("../mutex.zig"); @@ -155,10 +156,16 @@ pub fn outlineCommand(L: lua.State) callconv(.{ .x86_thiscall = .{} }) u32 { /// Usage: /// /run DEFAULT_CHAT_FRAME:AddMessage(OutlineDebug()) pub fn outlineDebug(L: lua.State) callconv(.{ .x86_thiscall = .{} }) u32 { - var buf: [256]u8 = undefined; + // One-shot diagnostic only: test WoW's GetGUIDFromName path when the user + // explicitly runs OutlineDebug(). We deliberately do NOT call this every + // frame while debugging stability. + const unit_guid_player = wow.unitGUID("player"); + const unit_guid_target = wow.unitGUID("target"); + + var buf: [320]u8 = undefined; const msg = std.fmt.bufPrintZ( &buf, - "OutlineDBG en={d} own={d} mh={d} d3d={d} end={d} world={d} om={d} pg={d} lp={d} tg={d} to={d} scan={d} tgt={d} mdl={d} dip={d} odip={d} cache={d} sh={d} rt={d} pipe={d}/{d}", + "OutlineDBG en={d} own={d} mh={d} d3d={d} end={d} world={d} om={d} pg={d} lp={d} tg={d} to={d} ugp={d} ugt={d} scan={d} tgt={d} mdl={d} dip={d} odip={d} cache={d} sh={d} rt={d} pipe={d}/{d}", .{ @intFromBool(isEnabled()), @intFromBool(g_is_hook_owner), @@ -171,6 +178,8 @@ pub fn outlineDebug(L: lua.State) callconv(.{ .x86_thiscall = .{} }) u32 { @intFromBool(tracker.debug_local_player_seen), @intFromBool(tracker.debug_target_guid_seen), @intFromBool(tracker.debug_target_object_seen), + @intFromBool(unit_guid_player != 0), + @intFromBool(unit_guid_target != 0), @intFromBool(tracker.debug_object_scan_seen), @intFromBool(tracker.debug_target_seen), @intFromBool(tracker.debug_target_model_seen),