mirror of
https://github.com/ACF-Team/CFW.git
synced 2025-03-04 03:03:16 -05:00
Don't track parented NPCs either
This commit is contained in:
parent
cea75d5f7e
commit
4ef05dc203
@ -56,6 +56,7 @@ hook.Add("Initialize", "CFW", function()
|
||||
if self._cfwRemoved then return end -- Removed by an undo
|
||||
if oldParent == newParent then return end
|
||||
if (validOldParent and oldParent:IsPlayer()) or (validNewParent and newParent:IsPlayer()) then return end
|
||||
if (validOldParent and oldParent:IsNPC()) or (validNewParent and newParent:IsNPC()) then return end
|
||||
if filter[self:GetClass()] then return end
|
||||
|
||||
if validOldParent then disconnect(self, oldParent:EntIndex(), isParent) end
|
||||
|
@ -2,7 +2,6 @@ TOOL.Category = "Contraption Framework"
|
||||
TOOL.Name = "CFW Tool"
|
||||
TOOL.AddToMenu = false
|
||||
|
||||
|
||||
--[[
|
||||
To access this, use 'gmod_tool cfw_tool'
|
||||
Hidden because this relies on developer 1, so not for use by normal means, for now
|
||||
@ -17,7 +16,6 @@ TOOL.AddToMenu = false
|
||||
When this happens, maybe allow normal use of the tool as well?
|
||||
]]
|
||||
|
||||
|
||||
TOOL.Entity = nil
|
||||
|
||||
function TOOL:LeftClick(tr)
|
||||
@ -50,6 +48,7 @@ function TOOL:Think()
|
||||
local tick = engine.TickInterval() + 0.05
|
||||
|
||||
local Rendered = {}
|
||||
|
||||
for _, link in pairs(selftbl._links) do
|
||||
local entA, entB = link.entA, link.entB
|
||||
debugoverlay.Line(entA:GetPos(),entB:GetPos(),tick,link.color,true)
|
||||
@ -64,9 +63,6 @@ function TOOL:Think()
|
||||
debugoverlay.Text(entB:GetPos(),"B",tick,false)
|
||||
Rendered[entB] = true
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user