Originally Posted by Nagí
I have tried both scripts. First the one from Ketho's post causes me massive FPS drops. When entering in combat with a training dummy everything is normal. But when in combat with a NPC who is targeting me, my FPS fall and are locked at ~20.
|
Oof, I should have tested that more. I'm not that familiar with textures as you can see
This doesn't seem to give a massive FPS drop, but still gives you a 5-10 FPS hit. which is not good
Lua Code:
local genders = {nil, "male", "female"}
hooksecurefunc("UnitFramePortrait_Update",function(self)
if self.portrait and UnitIsPlayer(self.unit) then
local _, race = UnitRace(self.unit)
local sexID = UnitSex(self.unit)
local atlas = GetRaceAtlas(race:lower(), genders[sexID], true)
self.portrait:SetAtlas(atlas)
if not self.portrait.hasMask then
self.portrait:SetMask("Interface\\CharacterFrame\\TempPortraitAlphaMask")
self.portrait.hasMask = true
end
end
end)