Skip to content

Commit

Permalink
Check type
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebual committed May 6, 2020
1 parent 47f9312 commit 9fe6b13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/entities/gmod_wire_lever.lua
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ else
util.AddNetworkString("wire_lever_activate")
net.Receive("wire_lever_activate", function(netlen, ply)
local ent = net.ReadEntity()
if not IsValid(ply) or not IsValid(ent) or not ent.Use then return end
if not IsValid(ply) or not IsValid(ent) or not ent.Use or ent:GetClass() ~= "gmod_wire_lever" then return end
if IsValid(ent.User) then return end

if ply:GetShootPos():Distance(ent:GetPos()) < 100 then
Expand Down

0 comments on commit 9fe6b13

Please sign in to comment.