mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-16 01:50:48 +00:00
castbar: limit lag to maximum castbar width
This commit is contained in:
+1
-1
@@ -124,7 +124,7 @@ pfUI:RegisterModule("castbar", "vanilla:tbc", function ()
|
|||||||
if this.showlag then
|
if this.showlag then
|
||||||
local _, _, lag = GetNetStats()
|
local _, _, lag = GetNetStats()
|
||||||
local width = this:GetWidth() / (duration/1000) * (lag/1000)
|
local width = this:GetWidth() / (duration/1000) * (lag/1000)
|
||||||
this.bar.lag:SetWidth(width)
|
this.bar.lag:SetWidth(math.min(this:GetWidth(), width))
|
||||||
else
|
else
|
||||||
this.bar.lag:Hide()
|
this.bar.lag:Hide()
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user