wyozi-gmod / imgui

Immediate mode 3D2D UI for Garry's Mod
MIT License
79 stars 21 forks source link

Fix hook identifiers #15

Closed EmperorSuper closed 4 years ago

EmperorSuper commented 4 years ago

debug.getinfo(1) is always the function calling debug.getinfo so it would always just point to the library itself, fixed it so it now points to the file where the library is included.

wyozi commented 4 years ago

Hmm, the goal was to actually make the imgui library itself unique and not the callsite, but I can see how that might break. Does including a module in GLua use the cached version or always instantiate a new one?

EmperorSuper commented 4 years ago

It always initiates a new one

EmperorSuper commented 4 years ago

@wyozi

wyozi commented 4 years ago

Okay, I guess this is good then. Although debug.getinfo number params always seem so arbitrary to me :D