Net messages correctly ignore entities that are not keypads

This commit is contained in:
William Wallace 2017-07-09 05:53:21 +01:00
parent d459635c9b
commit df9647cc50
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ util.AddNetworkString("Keypad")
net.Receive("Keypad", function(_, ply)
local ent = net.ReadEntity()
if not IsValid(ply) or not IsValid(ent) or not ent:GetClass():lower() == "keypad" then
if not IsValid(ply) or not IsValid(ent) or ent:GetClass():lower() ~= "keypad" then
return
end

View File

@ -11,7 +11,7 @@ util.AddNetworkString("Keypad_Wire")
net.Receive("Keypad_Wire", function(_, ply)
local ent = net.ReadEntity()
if not IsValid(ply) or not IsValid(ent) or not ent:GetClass():lower() == "keypad_wire" then
if not IsValid(ply) or not IsValid(ent) or ent:GetClass():lower() ~= "keypad_wire" then
return
end