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,11 +426,15 @@ function meta:BarricadeGhostingThink()
|
|||
end
|
||||
|
||||
function meta:ShouldNotCollide(ent)
|
||||
if ent:IsPlayer() then
|
||||
return self:Team() == ent:Team() or self.NoCollideAll or ent.NoCollideAll
|
||||
if ent:IsValid() then
|
||||
if ent:IsPlayer() then
|
||||
return self:Team() == ent:Team() or self.NoCollideAll or ent.NoCollideAll
|
||||
end
|
||||
|
||||
return self:GetBarricadeGhosting() and ent:IsBarricadeProp() or self:Team() == TEAM_HUMAN and ent:GetPhysicsObject():IsValid() and ent:GetPhysicsObject():HasGameFlag(FVPHYSICS_PLAYER_HELD)
|
||||
end
|
||||
|
||||
return self:GetBarricadeGhosting() and ent:IsBarricadeProp() or self:Team() == TEAM_HUMAN and ent:GetPhysicsObject():IsValid() and ent:GetPhysicsObject():HasGameFlag(FVPHYSICS_PLAYER_HELD)
|
||||
return false
|
||||
end
|
||||
|
||||
local function nocollidetimer(self, timername)
|
||||
|
|
Loading…
Reference in a new issue