Fix assuming valid players on PlayerCanHearPlayersVoice

Addresses https://github.com/JetBoom/zombiesurvival/issues/99
This commit is contained in:
JetBoom 2015-01-10 00:19:48 -05:00
parent 77fea51273
commit 13125a7ce2

View file

@ -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