Skip to content

Commit

Permalink
Make setname play nicely with E2 timers (#2845)
Browse files Browse the repository at this point in the history
* Make the GC timer a tick below a second

* Remove SHORT_SECOND
  • Loading branch information
Denneisk authored Nov 14, 2023
1 parent e889b89 commit 4bdb050
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lua/entities/gmod_wire_expression2/core/selfaware.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ end)
--[[******************************************************************************]]--
-- Name functions


local function doSetName(self, this, name)
local data_SetName = self.data.SetName
if not data_SetName then
Expand All @@ -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)

Expand Down

0 comments on commit 4bdb050

Please sign in to comment.