Move marker animation tick to DLL-side OnWorldUpdate hook

- Hook OnWorldUpdate (0x482EA0) for per-frame tick while world is active
- Remove Lua OnUpdate animation driver (ProcessMarkerAnimations)
- Add DistanceToMark(index) Lua API returning player-to-marker distance
- Track marker positions DLL-side for distance queries
- Clean up positions on marker clear and world teardown
This commit is contained in:
MarcelineVQ
2026-03-02 08:31:23 -08:00
parent 4b6e4ceaa9
commit e474b61c37
4 changed files with 99 additions and 82 deletions
+1 -1
View File
@@ -262,7 +262,7 @@ fn registerLuaFunctions() void {
registerFunction("WorldMarker", @intFromPtr(&markers.luaWorldMarker));
registerFunction("ClearWorldMarker", @intFromPtr(&markers.luaClearWorldMarker));
registerFunction("GetPlayerPosition", @intFromPtr(&markers.luaGetPlayerPosition));
registerFunction("ProcessMarkerAnimations", @intFromPtr(&markers.luaProcessAnimations));
registerFunction("DistanceToMark", @intFromPtr(&markers.luaDistanceToMark));
}
}