Fixed rare error in Player.ShouldNotCollide.
This commit is contained in:
parent
50f5cefdee
commit
7991fc146b
1 changed files with 7 additions and 3 deletions
|
@ -426,6 +426,7 @@ function meta:BarricadeGhostingThink()
|
|||
end
|
||||
|
||||
function meta:ShouldNotCollide(ent)
|
||||
if ent:IsValid() then
|
||||
if ent:IsPlayer() then
|
||||
return self:Team() == ent:Team() or self.NoCollideAll or ent.NoCollideAll
|
||||
end
|
||||
|
@ -433,6 +434,9 @@ function meta:ShouldNotCollide(ent)
|
|||
return self:GetBarricadeGhosting() and ent:IsBarricadeProp() or self:Team() == TEAM_HUMAN and ent:GetPhysicsObject():IsValid() and ent:GetPhysicsObject():HasGameFlag(FVPHYSICS_PLAYER_HELD)
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
local function nocollidetimer(self, timername)
|
||||
if self:IsValid() then
|
||||
for _, e in pairs(ents.FindInBox(self:WorldSpaceAABB())) do
|
||||
|
|
Loading…
Reference in a new issue