Fixed small issue with bone colors in adv select when switching bone filters

This commit is contained in:
penolakushari 2025-02-28 19:57:49 +03:00
parent f4d847360d
commit 2971a32d3c

View File

@ -3267,7 +3267,7 @@ local Col4
local LockMode, LockTo = false, { id = nil, ent = nil } local LockMode, LockTo = false, { id = nil, ent = nil }
local IsPropRagdoll, TreeEntities = false, {} local IsPropRagdoll, TreeEntities = false, {}
local ScaleLocks = {} local ScaleLocks = {}
local ResetMode = false local ResetMode, RecalculateColors = false, false
cvars.AddChangeCallback("ragdollmover_ik_hand_L", function(convar, old, new) cvars.AddChangeCallback("ragdollmover_ik_hand_L", function(convar, old, new)
if not IsValid(EnableIKButt) then return end if not IsValid(EnableIKButt) then return end
@ -3629,6 +3629,7 @@ local NodeFunctions = {
} }
local function SetBoneNodes(bonepanel, sortedbones) local function SetBoneNodes(bonepanel, sortedbones)
RecalculateColors = true
nodes = {} nodes = {}
local width = 0 local width = 0
@ -5006,7 +5007,8 @@ function TOOL:DrawHUD()
local id = 0 local id = 0
if self:GetOperation() == 2 and IsValid(ent) then if self:GetOperation() == 2 and IsValid(ent) then
local timecheck = (thinktime - LastSelectThink) > 0.1 local timecheck = (thinktime - LastSelectThink) > 0.1
local calc = ( not LastEnt or LastEnt ~= ent ) or timecheck local calc = ( not LastEnt or LastEnt ~= ent ) or timecheck or RecalculateColors
RecalculateColors = false
if self:GetStage() == 0 then if self:GetStage() == 0 then
BoneColors, BoneScaleGroup, id = rgm.AdvBoneSelectRender(ent, nodes, BoneColors, calc, eyepos, viewvec, fov) BoneColors, BoneScaleGroup, id = rgm.AdvBoneSelectRender(ent, nodes, BoneColors, calc, eyepos, viewvec, fov)