Skip to content

Commit a031c39

Browse files
committed
don't let lock grab its own owner
would mess things up with projectiles
1 parent aaefeff commit a031c39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/pac3/core/client/parts/lock.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ function PART:DecideTarget()
520520
chosen_ent = ent_candidate
521521
table.insert(ents_candidates, ent_candidate)
522522
end
523-
elseif self.PhysicsProps and (physics_point_ent_classes[ent_candidate:GetClass()] or string.find(ent_candidate:GetClass(),"item_") or string.find(ent_candidate:GetClass(),"ammo_")) then
523+
elseif self.PhysicsProps and (ent_candidate ~= self:GetRootPart():GetOwner()) and (physics_point_ent_classes[ent_candidate:GetClass()] or string.find(ent_candidate:GetClass(),"item_") or string.find(ent_candidate:GetClass(),"ammo_")) then
524524
chosen_ent = ent_candidate
525525
table.insert(ents_candidates, ent_candidate)
526526
elseif self.NPC and (ent_candidate:IsNPC() or ent_candidate:IsNextBot() or ent_candidate.IsDrGEntity or ent_candidate.IsVJBaseSNPC) then

0 commit comments

Comments
 (0)