Changed color system from using lerp to just using look up table for colors

This commit is contained in:
penolakushari 2024-12-22 20:55:21 +03:00
parent 3b908bfdae
commit e81fd36d8f

View File

@ -1142,7 +1142,7 @@ function AdvBoneSelectRender(ent, bonenodes)
table.insert(selectedBones, {name, i}) table.insert(selectedBones, {name, i})
else else
if nodesExist and bonenodes[ent][i] and bonenodes[ent][i].Type then if nodesExist and bonenodes[ent][i] and bonenodes[ent][i].Type then
surface.SetDrawColor(BONETYPE_COLORS[bonenodes[ent][i].Type][1]:Lerp(BONETYPE_COLORS[bonenodes[ent][i].Type][2], (bonedistances[i] - mindist) / (maxdist * 0.75)):Unpack()) surface.SetDrawColor(BONETYPE_COLORS[bonenodes[ent][i].Type][( ( bonedistances[i] - mindist ) < maxdist * 0.5 ) and 1 or 2]:Unpack())
else else
surface.SetDrawColor(COLOR_RGMGREEN:Unpack()) surface.SetDrawColor(COLOR_RGMGREEN:Unpack())
end end