Fix assuming valid players on PlayerCanHearPlayersVoice
Addresses https://github.com/JetBoom/zombiesurvival/issues/99
This commit is contained in:
parent
77fea51273
commit
13125a7ce2
1 changed files with 1 additions and 1 deletions
|
@ -428,7 +428,7 @@ function GM:PlayerCanPurchase(pl)
|
||||||
end
|
end
|
||||||
|
|
||||||
function GM:PlayerCanHearPlayersVoice(listener, talker)
|
function GM:PlayerCanHearPlayersVoice(listener, talker)
|
||||||
return listener:Team() == talker:Team()
|
return listener:IsValid() and talker:IsValid() and listener:Team() == talker:Team()
|
||||||
--[[if self:GetEndRound() then return true, false end
|
--[[if self:GetEndRound() then return true, false end
|
||||||
|
|
||||||
if listener:Team() == talker:Team() then
|
if listener:Team() == talker:Team() then
|
||||||
|
|
Loading…
Reference in a new issue