From bd0c0d16405e23e5f715dea264c82cf23ccc26af Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Thu, 29 Oct 2026 23:39:14 +0300 Subject: [PATCH 1/2] Fix wire clutch timers not removing They tick indefinitely after being created, and are not removed even after the entity is removed --- lua/entities/gmod_wire_clutch.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/entities/gmod_wire_clutch.lua b/lua/entities/gmod_wire_clutch.lua index 75eec1250a..4ff979207a 100644 --- a/lua/entities/gmod_wire_clutch.lua +++ b/lua/entities/gmod_wire_clutch.lua @@ -228,7 +228,7 @@ function ENT:TriggerInput( iname, value ) local Delay = numconstraints / maxrate self.ClutchDelay = true - timer.Create( "wire_clutch_delay_" .. tostring(self:EntIndex()), Delay, 0, function() ClutchDelayEnd(self) end ) + timer.Create( "wire_clutch_delay_" .. tostring(self:EntIndex()), Delay, 1, function() ClutchDelayEnd(self) end ) else -- This should only happen if an error prevents the ClutchDelayEnd function from being called From a4a53a9c9faf5d80b51f32d6b39ab57f0bbabc31 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Thu, 29 Oct 2026 23:43:56 +0300 Subject: [PATCH 2/2] Also remove timer on entity removal --- lua/entities/gmod_wire_clutch.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/entities/gmod_wire_clutch.lua b/lua/entities/gmod_wire_clutch.lua index 4ff979207a..4b4101884e 100644 --- a/lua/entities/gmod_wire_clutch.lua +++ b/lua/entities/gmod_wire_clutch.lua @@ -243,6 +243,11 @@ function ENT:TriggerInput( iname, value ) end end +function ENT:OnRemove() + timer.Remove("wire_clutch_delay_" .. tostring(self:EntIndex())) + BaseClass.OnRemove(self) +end + --[[-------------------------------------------------------