From b302524fba3a80160faa9957573c3e8ab260c05a Mon Sep 17 00:00:00 2001 From: Strand8319 Date: Wed, 25 Mar 2026 17:55:06 +0500 Subject: [PATCH 1/5] =?UTF-8?q?=E2=9E=95=20add=20set=20velocity=20and=20se?= =?UTF-8?q?t=20angle=20velocity=20gates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/wire/gates/entity.lua | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/lua/wire/gates/entity.lua b/lua/wire/gates/entity.lua index b5c086d603..ebfc8f791e 100644 --- a/lua/wire/gates/entity.lua +++ b/lua/wire/gates/entity.lua @@ -1236,4 +1236,36 @@ GateActions["entity_eyepos"] = { end } +GateActions["entity_setanglevelocity"] = { + name = "Set Angle Velocity", + inputs = { "Ent", "Ang" }, + inputtypes = { "ENTITY", "ANGLE" }, + timed = true, + output = function(gate, ent, ang) + if not isAllowed(gate, ent) then return end + local phys = ent:GetPhysicsObject() + if not IsValid(phys) then return end + phys:SetAngleVelocity(Vector(ang.p, ang.y, ang.r)) + end, + label = function(_, ent, ang) + return string.format("(%s):setAngleVelocity(%s)", ent, ang) + end +} + +GateActions["entity_setvelocity"] = { + name = "Set Velocity", + inputs = { "Ent", "Vec" }, + inputtypes = { "ENTITY", "VECTOR" }, + timed = true, + output = function(gate, ent, vec) + if not isAllowed(gate, ent) then return end + local phys = ent:GetPhysicsObject() + if not IsValid(phys) then return end + phys:SetVelocity(vec) + end, + label = function(_, ent, vec) + return string.format("(%s):setVelocity(%s)", ent, vec) + end +} + GateActions() From 4bfe584239d11beb0e8ce2b88e6e66e16b07aff4 Mon Sep 17 00:00:00 2001 From: Strand8319 Date: Thu, 26 Mar 2026 00:12:08 +0500 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=94=A7=20fix=20use=20clamp=20in=20set?= =?UTF-8?q?=20velocity=20gates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/wire/gates/entity.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/wire/gates/entity.lua b/lua/wire/gates/entity.lua index ebfc8f791e..7ac97d6ad2 100644 --- a/lua/wire/gates/entity.lua +++ b/lua/wire/gates/entity.lua @@ -1245,7 +1245,8 @@ GateActions["entity_setanglevelocity"] = { if not isAllowed(gate, ent) then return end local phys = ent:GetPhysicsObject() if not IsValid(phys) then return end - phys:SetAngleVelocity(Vector(ang.p, ang.y, ang.r)) + ang = clamp(Vector(ang.p, ang.y, ang.r)) + phys:SetAngleVelocity(ang) end, label = function(_, ent, ang) return string.format("(%s):setAngleVelocity(%s)", ent, ang) @@ -1261,6 +1262,7 @@ GateActions["entity_setvelocity"] = { if not isAllowed(gate, ent) then return end local phys = ent:GetPhysicsObject() if not IsValid(phys) then return end + vec = clamp(vec) phys:SetVelocity(vec) end, label = function(_, ent, vec) From c2b86f4f7b763944edf50fd2acf4ff426c96b52f Mon Sep 17 00:00:00 2001 From: Strand8319 Date: Fri, 27 Mar 2026 18:20:03 +0500 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=94=A7=20fix=20angle=20velocity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/wire/gates/entity.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/wire/gates/entity.lua b/lua/wire/gates/entity.lua index 7ac97d6ad2..9964f4077e 100644 --- a/lua/wire/gates/entity.lua +++ b/lua/wire/gates/entity.lua @@ -1245,7 +1245,7 @@ GateActions["entity_setanglevelocity"] = { if not isAllowed(gate, ent) then return end local phys = ent:GetPhysicsObject() if not IsValid(phys) then return end - ang = clamp(Vector(ang.p, ang.y, ang.r)) + ang = clamp(Angle(ang.p, ang.y, ang.r)) phys:SetAngleVelocity(ang) end, label = function(_, ent, ang) From 51f281639a72dcf3ac4bbda2a5f207877e5dc201 Mon Sep 17 00:00:00 2001 From: Strand8319 Date: Fri, 27 Mar 2026 18:27:49 +0500 Subject: [PATCH 4/5] =?UTF-8?q?Revert=20"=F0=9F=94=A7=20fix=20angle=20velo?= =?UTF-8?q?city"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit c2b86f4f7b763944edf50fd2acf4ff426c96b52f. --- lua/wire/gates/entity.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/wire/gates/entity.lua b/lua/wire/gates/entity.lua index 9964f4077e..7ac97d6ad2 100644 --- a/lua/wire/gates/entity.lua +++ b/lua/wire/gates/entity.lua @@ -1245,7 +1245,7 @@ GateActions["entity_setanglevelocity"] = { if not isAllowed(gate, ent) then return end local phys = ent:GetPhysicsObject() if not IsValid(phys) then return end - ang = clamp(Angle(ang.p, ang.y, ang.r)) + ang = clamp(Vector(ang.p, ang.y, ang.r)) phys:SetAngleVelocity(ang) end, label = function(_, ent, ang) From b51ecb33c965ea46eb9be8201ddc4c700b18d4a9 Mon Sep 17 00:00:00 2001 From: Strand8319 Date: Fri, 27 Mar 2026 18:36:58 +0500 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=94=A7=20fix=20entity=5Fsetangleveloc?= =?UTF-8?q?ity=20uses=20vector=20input?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/wire/gates/entity.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lua/wire/gates/entity.lua b/lua/wire/gates/entity.lua index 7ac97d6ad2..17fa0d5a11 100644 --- a/lua/wire/gates/entity.lua +++ b/lua/wire/gates/entity.lua @@ -1238,18 +1238,18 @@ GateActions["entity_eyepos"] = { GateActions["entity_setanglevelocity"] = { name = "Set Angle Velocity", - inputs = { "Ent", "Ang" }, - inputtypes = { "ENTITY", "ANGLE" }, + inputs = { "Ent", "Vec" }, + inputtypes = { "ENTITY", "VECTOR" }, timed = true, - output = function(gate, ent, ang) + output = function(gate, ent, vec) if not isAllowed(gate, ent) then return end local phys = ent:GetPhysicsObject() if not IsValid(phys) then return end - ang = clamp(Vector(ang.p, ang.y, ang.r)) - phys:SetAngleVelocity(ang) + vec = clamp(Vector(vec.x, vec.y, vec.z)) + phys:SetAngleVelocity(vec) end, - label = function(_, ent, ang) - return string.format("(%s):setAngleVelocity(%s)", ent, ang) + label = function(_, ent, vec) + return string.format("(%s):setAngleVelocity(%s)", ent, vec) end }