function FPP.Protect.ShouldCollide(ent1, ent2)
if not tobool(FPP.Settings.FPP_PHYSGUN.antinoob) then return end
if not ent1.IsBeingHeld then return end
if ent2:IsPlayer() and not ent1:IsPlayer() then return false end
if ent2 == GetWorldEntity() or not ValidEntity(ent1.Owner)/* or ent2 == ent1.Owner*/ then return true end
local cantouch, why = FPP.PlayerCanTouchEnt(ent1.Owner, ent2, "Physgun", "FPP_PHYSGUN")
if not cantouch then return false end
end
hook.Add("ShouldCollide", "FPP.Protect.ShouldCollide", FPP.Protect.ShouldCollide)
ShouldCollide is supposed to have static rules, otherwise you will break the physics engine
Hardy posted:
2) Don't know how, but my props started fall through the earth some time after server start(public server)
The reason is the hook ShouldCollide is a certain stage where re-enabling collisions between entities will cause the physics engine to break. You're better off setting collision groups than fucking with ShouldCollide.