From 4bdb0505965919440173fb1e10e12b209f760142 Mon Sep 17 00:00:00 2001 From: Denneisk <20892685+Denneisk@users.noreply.github.com> Date: Tue, 14 Nov 2023 17:02:58 -0500 Subject: [PATCH] Make setname play nicely with E2 timers (#2845) * Make the GC timer a tick below a second * Remove SHORT_SECOND --- lua/entities/gmod_wire_expression2/core/selfaware.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/entities/gmod_wire_expression2/core/selfaware.lua b/lua/entities/gmod_wire_expression2/core/selfaware.lua index c6b54431e7..2b06d377d9 100644 --- a/lua/entities/gmod_wire_expression2/core/selfaware.lua +++ b/lua/entities/gmod_wire_expression2/core/selfaware.lua @@ -93,7 +93,6 @@ end) --[[******************************************************************************]]-- -- Name functions - local function doSetName(self, this, name) local data_SetName = self.data.SetName if not data_SetName then @@ -109,7 +108,7 @@ local function doSetName(self, this, name) if totalChars >= 512 then return self:throw("You are sending too much data with setName!") end data_SetName._chars = totalChars - timer.Create("wire_doSetName_Cleanup" .. self.entity:EntIndex(), 1, 1, function() + timer.Create("wire_doSetName_Cleanup" .. self.entity:EntIndex(), 1 - engine.TickInterval(), 1, function() if self and self.data then self.data.SetName = nil end end)