From 2971a32d3cf2894e346124a38f9f8af3f4014a58 Mon Sep 17 00:00:00 2001 From: penolakushari <45951611+penolakushari@users.noreply.github.com> Date: Fri, 28 Feb 2025 19:57:49 +0300 Subject: [PATCH] Fixed small issue with bone colors in adv select when switching bone filters --- lua/weapons/gmod_tool/stools/ragdollmover.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/weapons/gmod_tool/stools/ragdollmover.lua b/lua/weapons/gmod_tool/stools/ragdollmover.lua index 59d0416..5a5f618 100644 --- a/lua/weapons/gmod_tool/stools/ragdollmover.lua +++ b/lua/weapons/gmod_tool/stools/ragdollmover.lua @@ -3267,7 +3267,7 @@ local Col4 local LockMode, LockTo = false, { id = nil, ent = nil } local IsPropRagdoll, TreeEntities = false, {} local ScaleLocks = {} -local ResetMode = false +local ResetMode, RecalculateColors = false, false cvars.AddChangeCallback("ragdollmover_ik_hand_L", function(convar, old, new) if not IsValid(EnableIKButt) then return end @@ -3629,6 +3629,7 @@ local NodeFunctions = { } local function SetBoneNodes(bonepanel, sortedbones) + RecalculateColors = true nodes = {} local width = 0 @@ -5006,7 +5007,8 @@ function TOOL:DrawHUD() local id = 0 if self:GetOperation() == 2 and IsValid(ent) then 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 BoneColors, BoneScaleGroup, id = rgm.AdvBoneSelectRender(ent, nodes, BoneColors, calc, eyepos, viewvec, fov)