Skip to content

Commit

Permalink
Fixed: Tool screen draws existent anchor when the entity is removed
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdvideo1234 committed Dec 10, 2017
1 parent dea6087 commit af15e7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lua/autorun/trackassembly_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions lua/weapons/gmod_tool/stools/trackassembly.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit af15e7e

Please sign in to comment.