Skip to content

Commit

Permalink
removed unnecessary logic
Browse files Browse the repository at this point in the history
  • Loading branch information
unknao committed Dec 25, 2024
1 parent 1de2ec0 commit a722a5e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lua/entities/gmod_wire_expression2/core/timer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -244,18 +244,9 @@ e2function void timerSetDelay(string name, number delay)
end

local entIndex = self.entity:EntIndex()
local internalName = luaTimerGetInternalName(entIndex, name)
luaTimers[entIndex][name].delay = delay

if luaTimers[entIndex][name].repetitions > 0 then
local repsLeft = timer.RepsLeft(internalName)
if repsLeft == 0 then return end

luaTimers[entIndex][name].repetitions = repsLeft
timer.Adjust(internalName, delay, repsLeft)
return
end
timer.Adjust(internalName, delay, 0)
timer.Adjust(luaTimerGetInternalName(entIndex, name), delay)
end

e2function number timerSetReps(string name, number repetitions)
Expand Down

0 comments on commit a722a5e

Please sign in to comment.