From aab601e2b748f0520f3ff984d1803bcae2ecb86a Mon Sep 17 00:00:00 2001 From: Divran Date: Sat, 9 May 2020 20:43:44 +0200 Subject: [PATCH] added nonzero check to clear input --- lua/entities/gmod_wire_dhdd.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lua/entities/gmod_wire_dhdd.lua b/lua/entities/gmod_wire_dhdd.lua index 5a2fc53c7f..f068f363b3 100644 --- a/lua/entities/gmod_wire_dhdd.lua +++ b/lua/entities/gmod_wire_dhdd.lua @@ -94,9 +94,11 @@ function ENT:TriggerInput( name, value ) self.Size = size self.WantsUpdate = true elseif (name == "Clear") then - self.Memory = {} - self.Size = 0 - self.WantsUpdate = true + if value ~= 0 then + self.Memory = {} + self.Size = 0 + self.WantsUpdate = true + end elseif (name == "AllowWrite") then self.AllowWrite = value >= 1 end