From 1de73dc5d8f8763d3a194f9d35538b17e129d848 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Sun, 21 Dec 2025 22:52:53 +0300 Subject: [PATCH 1/2] Fix some propcore functions can be called only once per tick for no reason Fixes: https://discord.com/channels/231131817640460288/231581733831704578/1452368914737528874 --- .../gmod_wire_expression2/core/custom/prop.lua | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lua/entities/gmod_wire_expression2/core/custom/prop.lua b/lua/entities/gmod_wire_expression2/core/custom/prop.lua index f0e0146dbd..11c78218b5 100644 --- a/lua/entities/gmod_wire_expression2/core/custom/prop.lua +++ b/lua/entities/gmod_wire_expression2/core/custom/prop.lua @@ -832,9 +832,7 @@ end [nodiscard] e2function number entity:propCanSetDupeable() - local isOk, Val = pcall(ValidAction, self, this, "noDupe") - if not isOk then return 0 end - + if not IsValid(this) then return self:throw("Invalid entity!", 0) end return canMarkDupeable(this, self.player) and 1 or 0 end @@ -933,7 +931,7 @@ e2function void entity:propSetFriction(number friction) end e2function number entity:propGetFriction() - if not ValidAction(self, this, "friction") then return 0 end + if not IsValid(this) then return self:throw("Invalid entity!", 0) end return this:GetFriction() end @@ -961,10 +959,9 @@ e2function void entity:propPhysicalMaterial(string physprop) end e2function string entity:propPhysicalMaterial() - if not ValidAction(self, this, "physprop") then return "" end + if not IsValid(this) then return self:throw("Invalid entity!", 0) end local phys = this:GetPhysicsObject() - if IsValid(phys) then return phys:GetMaterial() or "" end - return "" + return phys:IsValid() and phys:GetMaterial() or "" end e2function void entity:propSetVelocity(vector velocity) @@ -1238,7 +1235,7 @@ e2function void entity:ragdollSetAng(angle rot) end e2function table entity:ragdollGetPose() - if not ValidAction(self, this) then return end + if not IsValid(this) then return self:throw("Invalid entity!", newE2Table()) end local pose = newE2Table() local bones = GetBones(this) local originPos, originAng = bones[0]:GetPos(), bones[0]:GetAngles() From 6ff5bbabb100cc0c4f1682f9043f5b3bcf1ae912 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Sun, 21 Dec 2025 22:54:34 +0300 Subject: [PATCH 2/2] Fix --- lua/entities/gmod_wire_expression2/core/custom/prop.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/entities/gmod_wire_expression2/core/custom/prop.lua b/lua/entities/gmod_wire_expression2/core/custom/prop.lua index 11c78218b5..7f64756938 100644 --- a/lua/entities/gmod_wire_expression2/core/custom/prop.lua +++ b/lua/entities/gmod_wire_expression2/core/custom/prop.lua @@ -959,7 +959,7 @@ e2function void entity:propPhysicalMaterial(string physprop) end e2function string entity:propPhysicalMaterial() - if not IsValid(this) then return self:throw("Invalid entity!", 0) end + if not IsValid(this) then return self:throw("Invalid entity!", "") end local phys = this:GetPhysicsObject() return phys:IsValid() and phys:GetMaterial() or "" end