diff --git a/lua/autorun/trackassembly_init.lua b/lua/autorun/trackassembly_init.lua index 28ad5679..2807b2ab 100644 --- a/lua/autorun/trackassembly_init.lua +++ b/lua/autorun/trackassembly_init.lua @@ -33,7 +33,7 @@ local asmlib = trackasmlib ------ CONFIGURE ASMLIB ------ asmlib.InitBase("track","assembly") -asmlib.SetOpVar("TOOL_VERSION","5.425") +asmlib.SetOpVar("TOOL_VERSION","5.426") asmlib.SetIndexes("V",1,2,3) asmlib.SetIndexes("A",1,2,3) asmlib.SetIndexes("S",4,5,6,7) diff --git a/lua/weapons/gmod_tool/stools/trackassembly.lua b/lua/weapons/gmod_tool/stools/trackassembly.lua index 36d66d12..47fd0124 100644 --- a/lua/weapons/gmod_tool/stools/trackassembly.lua +++ b/lua/weapons/gmod_tool/stools/trackassembly.lua @@ -366,15 +366,15 @@ function TOOL:IntersectSnap(trEnt, vHit, stSpawn, bMute) end function TOOL:ClearAnchor(bMute) - local svEnt = self:GetEnt(1) - local plPly = self:GetOwner() + local svEnt, plPly = self:GetEnt(1), self:GetOwner() + if(CLIENT) then return end; self:ClearObjects() + asmlib.ConCommandPly(plPly,"anchor",gsNoAnchor) if(svEnt and svEnt:IsValid()) then - svEnt:SetRenderMode(RENDERMODE_TRANSALPHA) svEnt:SetColor(conPalette:Select("w")) - if(not bMute and SERVER) then + svEnt:SetRenderMode(RENDERMODE_TRANSALPHA) + if(not bMute) then local sAnchor = svEnt:EntIndex()..gsSymRev..svEnt:GetModel():GetFileFromFilename() asmlib.PrintNotifyPly(plPly,"Anchor: Cleaned "..sAnchor.." !","CLEANUP") end - self:ClearObjects(); asmlib.ConCommandPly(plPly,"anchor",gsNoAnchor) end; return asmlib.StatusLog(true,"TOOL:ClearAnchor("..tostring(bMute).."): Anchor cleared") end