From 978c72139dfd344f140d287f63d09d73485668f5 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Sat, 11 Jul 2026 02:40:36 +0300 Subject: [PATCH 1/2] Fix lua error Fixes: ``` - addons/advdupe2/lua/entities/gmod_contr_spawner/init.lua:190: Tried to use a NULL physics object! 1. GetAngleVelocity - [C]:-1 2. DoSpawn - addons/advdupe2/lua/entities/gmod_contr_spawner/init.lua:190 3. - addons/advdupe2/lua/entities/gmod_contr_spawner/init.lua:237 4. ProtectedCall - [C]:-1 5. TriggerInput - addons/wire/lua/wire/server/wirelib.lua:87 6. TriggerOutput - addons/wire/lua/wire/server/wirelib.lua:732 7. - addons/wire/lua/entities/gmod_wire_pod.lua:373 8. Run - addons/hook-library/lua/includes/modules/hook.lua:348 9. - addons/wire/lua/wire/wireshared.lua:1198 10. - addons/hook-library/lua/includes/modules/hook.lua:348 ``` --- lua/entities/gmod_contr_spawner/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/entities/gmod_contr_spawner/init.lua b/lua/entities/gmod_contr_spawner/init.lua index 89c4e58..1dbfabd 100644 --- a/lua/entities/gmod_contr_spawner/init.lua +++ b/lua/entities/gmod_contr_spawner/init.lua @@ -187,7 +187,11 @@ function ENT:DoSpawn( ply ) if(ent.SetForce)then ent.SetForce(ent, ent.force, ent.mul) end if(self.AddVelocity==1)then phys:SetVelocity( self:GetVelocity() ) - phys:AddAngleVelocity( self:GetPhysicsObject():GetAngleVelocity() ) + local self_phys = self:GetPhysicsObject() + + if IsValid( phys ) then + phys:AddAngleVelocity( self_phys:GetAngleVelocity() ) + end end end From d8ac14499e4985321e34be305ea5ed545a4c5c79 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Sat, 11 Jul 2026 02:41:10 +0300 Subject: [PATCH 2/2] Woops --- lua/entities/gmod_contr_spawner/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/entities/gmod_contr_spawner/init.lua b/lua/entities/gmod_contr_spawner/init.lua index 1dbfabd..815a85d 100644 --- a/lua/entities/gmod_contr_spawner/init.lua +++ b/lua/entities/gmod_contr_spawner/init.lua @@ -189,7 +189,7 @@ function ENT:DoSpawn( ply ) phys:SetVelocity( self:GetVelocity() ) local self_phys = self:GetPhysicsObject() - if IsValid( phys ) then + if IsValid( self_phys ) then phys:AddAngleVelocity( self_phys:GetAngleVelocity() ) end end