Intial Commit

This commit is contained in:
2026-10-27 17:16:21 -04:00
parent 15f0a3fee1
commit 25f8486506
17 changed files with 645 additions and 1 deletions
@@ -0,0 +1,25 @@
-- Replace only MTK's tracer UI callback. Its physics, hits, ammunition and
-- VisualProjectilePC lifecycle stay owned by the original mod.
local legacy, replacement
local function install()
local bridge = MTKViewpointProjectiles
if not bridge or not VisualProjectilePC then return end
if not bridge.bind(VisualProjectilePC.removeByID, VisualProjectilePC.list) then
print("[MTKViewpointTurrets] MTK projectile API differs; original drawing retained.")
return
end
if replacement then return end
legacy = bridge.legacyRenderer()
if not legacy then
print("[MTKViewpointTurrets] MTK tracer callback not identified; original drawing retained.")
return
end
replacement = function()
if not MTKViewpointCamera or not MTKViewpointCamera.enabled() then return legacy() end
end
Events.OnPreUIDraw.Remove(legacy)
Events.OnPreUIDraw.Add(replacement)
print("[MTKViewpointTurrets] 3D projectile renderer registered; isometric tracers retained in iso view.")
end
Events.OnGameBoot.Add(install)
Events.OnGameStart.Add(install)