You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add throw modes
semi-revert previous change: add option to ignore pac projectiles from being considered as physics props
option to limit the angle reset (if physics, don't reset. if player/npc, reset only roll)
for the revert lock state, change the no collide collision type to avoid physics falling through the world, and fix the gravity on physics objects
Copy file name to clipboardExpand all lines: lua/pac3/core/client/parts/lock.lua
+80-2Lines changed: 80 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,19 @@ BUILDER:StartStorableVars()
55
55
:GetSet("OverrideAngles", true, {description="Whether the part will rotate the entity alongside it, otherwise it changes just the position"})
56
56
:GetSet("RelativeGrab", false)
57
57
:GetSet("RestoreDelay", 1, {description="Seconds until the entity's original angles before self.grabbing are re-applied"})
58
+
:GetSet("MinimalRestore", false, {description="Skip the angle reset on physics entities. But for players and NPCs, it'll still have to reset pitch and roll"})
58
59
:GetSet("NoCollide", true, {description="Whether to disable collisions on the entity while grabbed."})
60
+
:GetSet("ThrowMode", "None", {description="send a force impulse when hidden", enums= {
ifnotpac.CountNetMessage() thenself:SetInfo("Went beyond the allowance") returnend
466
543
end
467
544
net.Start("pac_request_angle_reset_on_entity")
468
-
net.WriteAngle(Angle(0,0,0))
545
+
net.WriteAngle(ang)
469
546
net.WriteFloat(self.RestoreDelay)
470
547
net.WriteEntity(reset_ent)
471
548
net.WriteEntity(self:GetPlayerOwner())
@@ -521,9 +598,10 @@ function PART:DecideTarget()
521
598
table.insert(ents_candidates, ent_candidate)
522
599
end
523
600
elseifself.PhysicsPropsand (ent_candidate~=self:GetRootPart():GetOwner()) and (physics_point_ent_classes[ent_candidate:GetClass()] orstring.find(ent_candidate:GetClass(),"item_") orstring.find(ent_candidate:GetClass(),"ammo_")) then
elseifself.NPCand (ent_candidate~=self:GetRootPart():GetOwner()) and (ent_candidate:IsNPC() orent_candidate:IsNextBot() orent_candidate.IsDrGEntityorent_candidate.IsVJBaseSNPC) then
604
+
elseifself.NPCand (ent_candidate:IsNPC() orent_candidate:IsNextBot() orent_candidate.IsDrGEntityorent_candidate.IsVJBaseSNPC) then
0 commit comments