Skip to content

Commit

Permalink
added nonzero check to clear input
Browse files Browse the repository at this point in the history
  • Loading branch information
Divran authored May 9, 2020
1 parent 15e575a commit aab601e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lua/entities/gmod_wire_dhdd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aab601e

Please sign in to comment.