Skip to content

Commit e0593c1

Browse files
committed
also prevent self-grab here
1 parent a031c39 commit e0593c1

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
@@ -523,7 +523,7 @@ function PART:DecideTarget()
523523
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)
526-
elseif self.NPC and (ent_candidate:IsNPC() or ent_candidate:IsNextBot() or ent_candidate.IsDrGEntity or ent_candidate.IsVJBaseSNPC) then
526+
elseif self.NPC and (ent_candidate ~= self:GetRootPart():GetOwner()) and (ent_candidate:IsNPC() or ent_candidate:IsNextBot() or ent_candidate.IsDrGEntity or ent_candidate.IsVJBaseSNPC) then
527527
chosen_ent = ent_candidate
528528
table.insert(ents_candidates, ent_candidate)
529529
end

0 commit comments

Comments
 (0)