diff --git a/gamemodes/terrortown/gamemode/client/cl_vskin/default_skin.lua b/gamemodes/terrortown/gamemode/client/cl_vskin/default_skin.lua index e54b0a9f4b..e291ecce2d 100644 --- a/gamemodes/terrortown/gamemode/client/cl_vskin/default_skin.lua +++ b/gamemodes/terrortown/gamemode/client/cl_vskin/default_skin.lua @@ -1768,8 +1768,8 @@ function SKIN:PaintRoleImageTTT2(panel, w, h) drawFilteredShadowedTexture( widthBorder, widthBorder, - sizeIconRole - widthBorder2, - sizeIconRole - widthBorder2, + sizeIconRole, + sizeIconRole, panel:GetMaterial(), colorIcon.a, colorIcon @@ -1778,8 +1778,8 @@ function SKIN:PaintRoleImageTTT2(panel, w, h) drawFilteredTexture( widthBorder, widthBorder, - sizeIconRole - widthBorder2, - sizeIconRole - widthBorder2, + sizeIconRole, + sizeIconRole, panel:GetMaterial(), colorIcon.a * 0.5, colorIcon diff --git a/gamemodes/terrortown/gamemode/client/cl_vskin/vgui/dbutton_ttt2.lua b/gamemodes/terrortown/gamemode/client/cl_vskin/vgui/dbutton_ttt2.lua index fef517f051..8b5472bb1e 100644 --- a/gamemodes/terrortown/gamemode/client/cl_vskin/vgui/dbutton_ttt2.lua +++ b/gamemodes/terrortown/gamemode/client/cl_vskin/vgui/dbutton_ttt2.lua @@ -74,7 +74,10 @@ function PANEL:SetConVar(cvar) return end - self:SetDefaultValue(tobool(GetConVar(cvar):GetDefault())) + self.convar = GetConVar(cvar) + + self:SetDefaultValue(tobool(self.convar:GetDefault())) + self:SetValue(self.convar:GetBool()) end local callbackEnabledVarTracker = 0 @@ -217,7 +220,9 @@ function PANEL:ValueChanged(val) val = not val end - if self.serverConVar and not self:GetIgnoreCallbackEnabledVar() then + if self.convar then + self.convar:SetBool(val) + elseif self.serverConVar and not self:GetIgnoreCallbackEnabledVar() then cvars.ChangeServerConVar(self.serverConVar, val and "1" or "0") elseif self.databaseInfo and not self:GetIgnoreCallbackEnabledVar() then database.SetValue( diff --git a/gamemodes/terrortown/gamemode/client/cl_vskin/vgui/drolelayeringreceiver_ttt2.lua b/gamemodes/terrortown/gamemode/client/cl_vskin/vgui/drolelayeringreceiver_ttt2.lua index 2f8222d0e3..4ccc4fd672 100644 --- a/gamemodes/terrortown/gamemode/client/cl_vskin/vgui/drolelayeringreceiver_ttt2.lua +++ b/gamemodes/terrortown/gamemode/client/cl_vskin/vgui/drolelayeringreceiver_ttt2.lua @@ -236,7 +236,7 @@ function PANEL:InitRoles(layeredRoles) ic:SetTooltip(roleData.name) ic:SetTooltipFixedPosition(0, 64) ic:SetServerConVar("ttt_" .. roleData.name .. "_enabled") - ic:EnableIndicator(true) + ic:SetIsActiveIndicator(true) ic.subrole = subrole