From 96f702e40e12470030fbad30ac0abed624494cdd Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 30 Aug 2014 10:48:17 +0100 Subject: [PATCH] Hotfix #2 Fixes errors when trying to throw entities with invalid physobjects in (bugbait etc) --- lua/entities/linked_portal_door/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/entities/linked_portal_door/init.lua b/lua/entities/linked_portal_door/init.lua index 9095f4a..3ab5bf7 100644 --- a/lua/entities/linked_portal_door/init.lua +++ b/lua/entities/linked_portal_door/init.lua @@ -61,7 +61,7 @@ function ENT:Touch( ent ) ent:SetAngles( new_angle ) local phys = ent:GetPhysicsObject() - if phys then phys:SetVelocity( new_velocity ) end + if IsValid(phys) then phys:SetVelocity( new_velocity ) end end ent:ForcePlayerDrop()