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
+9
View File
@@ -91,6 +91,15 @@ pub const WF_HIT_TERRAIN_X: usize = 0x360;
pub const WF_HIT_TERRAIN_Y: usize = 0x364;
pub const WF_HIT_TERRAIN_Z: usize = 0x368;
// =============================================================================
// Per-frame world update
// =============================================================================
/// OnWorldUpdate — __fastcall(ECX=worldFrame), no stack params, void return.
/// Called every frame while the world is active (in-game, not login screen).
/// Part of CGWorldFrame update pipeline.
pub const FN_ON_WORLD_UPDATE: usize = 0x00482EA0;
// =============================================================================
// Model creation
// =============================================================================