Fix possible IsValid error in PlayerSelectSpawn
Addresses https://github.com/JetBoom/zombiesurvival/issues/97
This commit is contained in:
parent
13125a7ce2
commit
57cbcc0b1e
1 changed files with 1 additions and 1 deletions
|
@ -791,7 +791,7 @@ function GM:PlayerSelectSpawn(pl)
|
||||||
local blocked
|
local blocked
|
||||||
local spawnpos = spawn:GetPos()
|
local spawnpos = spawn:GetPos()
|
||||||
for _, ent in pairs(ents.FindInBox(spawnpos + playermins, spawnpos + playermaxs)) do
|
for _, ent in pairs(ents.FindInBox(spawnpos + playermins, spawnpos + playermaxs)) do
|
||||||
if ent and ent:IsValid() and ent:IsPlayer() and not spawninplayer or string.sub(ent:GetClass(), 1, 5) == "prop_" then
|
if IsValid(ent) and ent:IsPlayer() and not spawninplayer or string.sub(ent:GetClass(), 1, 5) == "prop_" then
|
||||||
blocked = true
|
blocked = true
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue