Fix for Lag caused by the Danbadge
This commit is contained in:
parent
9083a790d4
commit
7373bc6fc2
|
@ -4,28 +4,21 @@ local isBadge = game.GetSkinSetting("is_badges")
|
|||
|
||||
local none = gfx.CreateSkinImage("dan/none.png", 1)
|
||||
|
||||
if not isBadge then
|
||||
badgePath = "dan/original/" .. badges .. ".png"
|
||||
else
|
||||
badgePath = "dan/custom/" .. customBadges .. ".png"
|
||||
end
|
||||
|
||||
local newBadge = gfx.CreateSkinImage(badgePath, 1)
|
||||
|
||||
local badger = function(isDemo)
|
||||
local newBadge
|
||||
local finalBadge
|
||||
|
||||
if not isBadge then
|
||||
newBadge = gfx.CreateSkinImage("dan/original/"..badges..".png", 1)
|
||||
if isDemo then
|
||||
finalBadge = none
|
||||
elseif badges ~= "NONE" then
|
||||
finalBadge = newBadge
|
||||
else
|
||||
finalBadge = none
|
||||
end
|
||||
if isDemo or badges == "NONE" then
|
||||
finalBadge = none
|
||||
else
|
||||
newBadge = gfx.CreateSkinImage("dan/custom/"..customBadges..".png", 1)
|
||||
if isDemo then
|
||||
finalBadge = none
|
||||
elseif badges ~= "NONE" then
|
||||
finalBadge = newBadge
|
||||
else
|
||||
finalBadge = none
|
||||
end
|
||||
finalBadge = newBadge
|
||||
end
|
||||
|
||||
return finalBadge
|
||||
|
|
|
@ -156,13 +156,14 @@ local render = function (deltaTime, score, bestReplay,users)
|
|||
return
|
||||
end
|
||||
|
||||
for i, u in ipairs(users) do
|
||||
local posistion_w, posistion_h = gfx.ImageSize(pos[i]);
|
||||
gfx.BeginPath();
|
||||
if u.name == username then
|
||||
gfx.ImageRect(x + 215, y + 78, posistion_w/1.17, posistion_h/1.17, pos[i], 1, 0);
|
||||
end
|
||||
end
|
||||
for i, u in ipairs(users) do
|
||||
local posistion_w, posistion_h = gfx.ImageSize(pos[i]);
|
||||
gfx.BeginPath();
|
||||
if u.name == username then
|
||||
gfx.ImageRect(x + 215, y + 78, posistion_w/1.17, posistion_h/1.17, pos[i], 1, 0);
|
||||
end
|
||||
return
|
||||
end
|
||||
else
|
||||
|
||||
appealCardImage = gfx.CreateSkinImage("gameplay/user_panel/appeal_card.png", 0);
|
||||
|
|
Loading…
Reference in New Issue