Skip to content

Commit

Permalink
Hotfix #2
Browse files Browse the repository at this point in the history
Fixes errors when trying to throw entities with invalid physobjects in
(bugbait etc)
  • Loading branch information
MattJeanes committed Aug 30, 2014
1 parent 51d8c80 commit 96f702e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/entities/linked_portal_door/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 96f702e

Please sign in to comment.