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)
|
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 badger = function(isDemo)
|
||||||
local newBadge
|
|
||||||
local finalBadge
|
local finalBadge
|
||||||
|
|
||||||
if not isBadge then
|
if isDemo or badges == "NONE" then
|
||||||
newBadge = gfx.CreateSkinImage("dan/original/"..badges..".png", 1)
|
finalBadge = none
|
||||||
if isDemo then
|
|
||||||
finalBadge = none
|
|
||||||
elseif badges ~= "NONE" then
|
|
||||||
finalBadge = newBadge
|
|
||||||
else
|
|
||||||
finalBadge = none
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
newBadge = gfx.CreateSkinImage("dan/custom/"..customBadges..".png", 1)
|
finalBadge = newBadge
|
||||||
if isDemo then
|
|
||||||
finalBadge = none
|
|
||||||
elseif badges ~= "NONE" then
|
|
||||||
finalBadge = newBadge
|
|
||||||
else
|
|
||||||
finalBadge = none
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return finalBadge
|
return finalBadge
|
||||||
|
|
|
@ -156,13 +156,14 @@ local render = function (deltaTime, score, bestReplay,users)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
for i, u in ipairs(users) do
|
for i, u in ipairs(users) do
|
||||||
local posistion_w, posistion_h = gfx.ImageSize(pos[i]);
|
local posistion_w, posistion_h = gfx.ImageSize(pos[i]);
|
||||||
gfx.BeginPath();
|
gfx.BeginPath();
|
||||||
if u.name == username then
|
if u.name == username then
|
||||||
gfx.ImageRect(x + 215, y + 78, posistion_w/1.17, posistion_h/1.17, pos[i], 1, 0);
|
gfx.ImageRect(x + 215, y + 78, posistion_w/1.17, posistion_h/1.17, pos[i], 1, 0);
|
||||||
end
|
end
|
||||||
end
|
return
|
||||||
|
end
|
||||||
else
|
else
|
||||||
|
|
||||||
appealCardImage = gfx.CreateSkinImage("gameplay/user_panel/appeal_card.png", 0);
|
appealCardImage = gfx.CreateSkinImage("gameplay/user_panel/appeal_card.png", 0);
|
||||||
|
|
Loading…
Reference in New Issue