mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-29 18:56:02 +00:00
added a 100fps throttle for nameplates internally
This commit is contained in:
@@ -574,8 +574,13 @@ nameplates:RegisterEvent("ZONE_CHANGED_NEW_AREA")
|
||||
end)
|
||||
|
||||
nameplates:SetScript("OnUpdate", function()
|
||||
-- PERF: Throttle central OnUpdate to ~100 FPS (0.01s)
|
||||
local now = GetTime()
|
||||
if (this.frameTick or 0) + 0.01 > now then return end
|
||||
this.frameTick = now
|
||||
|
||||
-- PERF: Cache GetTime() once per frame
|
||||
frameState.now = GetTime()
|
||||
frameState.now = now
|
||||
frameState.hasTarget, frameState.targetGuid = UnitExists("target")
|
||||
frameState.hasMouseover = UnitExists("mouseover")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user