From 9ef330c136a31785737b9f11007157232a96fe7c Mon Sep 17 00:00:00 2001 From: unknao Date: Fri, 27 Dec 2024 06:17:18 +0200 Subject: [PATCH] Fix lambda timers timerSetDelay not accounting for repetitions. (#3226) * Add entity:parentToAttachment() * Fix design oversight on timerSetDelay. * removed unnecessary logic --- lua/entities/gmod_wire_expression2/core/timer.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/entities/gmod_wire_expression2/core/timer.lua b/lua/entities/gmod_wire_expression2/core/timer.lua index 831baa6541..ed042a72ef 100644 --- a/lua/entities/gmod_wire_expression2/core/timer.lua +++ b/lua/entities/gmod_wire_expression2/core/timer.lua @@ -58,7 +58,7 @@ local luaTimers = { delay = 1, repetitions = 1 } - } + } */ } @@ -245,7 +245,8 @@ e2function void timerSetDelay(string name, number delay) local entIndex = self.entity:EntIndex() luaTimers[entIndex][name].delay = delay - timer.Adjust(luaTimerGetInternalName(entIndex, name), delay, 0) + + timer.Adjust(luaTimerGetInternalName(entIndex, name), delay) end e2function number timerSetReps(string name, number repetitions)