easteregg: align explosion speed to framerate

This commit is contained in:
shagu
2020-12-31 14:46:32 +01:00
parent 4c739fe2cc
commit cf5345ed69
+4 -3
View File
@@ -72,9 +72,10 @@ pfUI:RegisterModule("easteregg", "vanilla:tbc", function ()
-- basic explosion animation
local function animation()
this:SetWidth(this:GetWidth()+2)
this:SetHeight(this:GetHeight()+2)
this:SetAlpha(this:GetAlpha() - .05)
local fps = (60 / math.max(GetFramerate(), 1))
this:SetWidth(this:GetWidth()+fps)
this:SetHeight(this:GetHeight()+fps)
this:SetAlpha(this:GetAlpha()-fps*.01)
if this:GetAlpha() <= 0 then
this.free = true
this:Hide()