From cb1aa6d4b0d7ee5b2c82631496519f2948b4894b Mon Sep 17 00:00:00 2001 From: Redox <69946827+wrefgtzweve@users.noreply.github.com> Date: Thu, 17 Sep 2026 16:51:57 +0200 Subject: [PATCH 1/2] Check if MyEntId isnt nil --- lua/entities/gmod_wire_motor.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/entities/gmod_wire_motor.lua b/lua/entities/gmod_wire_motor.lua index 7170cb4c28..698e07a0c4 100644 --- a/lua/entities/gmod_wire_motor.lua +++ b/lua/entities/gmod_wire_motor.lua @@ -55,7 +55,9 @@ function MakeWireMotorController( pl, Pos, Ang, MyEntId, model, const, axis ) if not IsValid(controller) then return end if not const then - WireMotorTracking[ MyEntId ] = controller + if MyEntId then + WireMotorTracking[ MyEntId ] = controller + end else controller.MyId = controller:EntIndex() const.MyCrtl = controller:EntIndex() From 1efe7cd3cf34d15084babf8e74b206e6064cdc57 Mon Sep 17 00:00:00 2001 From: Redox <69946827+wrefgtzweve@users.noreply.github.com> Date: Fri, 18 Sep 2026 22:01:04 +0200 Subject: [PATCH 2/2] Apply fix to hydraulic too --- lua/entities/gmod_wire_hydraulic.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/entities/gmod_wire_hydraulic.lua b/lua/entities/gmod_wire_hydraulic.lua index b42847a943..cb30670908 100644 --- a/lua/entities/gmod_wire_hydraulic.lua +++ b/lua/entities/gmod_wire_hydraulic.lua @@ -141,7 +141,9 @@ function MakeWireHydraulicController( pl, Pos, Ang, model, MyEntId, const, rope if not IsValid(controller) then return end if not const then - WireHydraulicTracking[ MyEntId ] = controller + if MyEntId then + WireHydraulicTracking[ MyEntId ] = controller + end else controller.MyId = controller:EntIndex() const.MyCrtl = controller:EntIndex()