From cf5345ed692ca07b619062d10350a0878252ede1 Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 31 Dec 2020 14:46:32 +0100 Subject: [PATCH] easteregg: align explosion speed to framerate --- modules/easteregg.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/easteregg.lua b/modules/easteregg.lua index f0ea46db..513d5475 100644 --- a/modules/easteregg.lua +++ b/modules/easteregg.lua @@ -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()