mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-25 13:30:50 +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)
|
end)
|
||||||
|
|
||||||
nameplates:SetScript("OnUpdate", function()
|
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
|
-- PERF: Cache GetTime() once per frame
|
||||||
frameState.now = GetTime()
|
frameState.now = now
|
||||||
frameState.hasTarget, frameState.targetGuid = UnitExists("target")
|
frameState.hasTarget, frameState.targetGuid = UnitExists("target")
|
||||||
frameState.hasMouseover = UnitExists("mouseover")
|
frameState.hasMouseover = UnitExists("mouseover")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user