Target finding function now actually returns nil on an invalid input like it should
This commit is contained in:
parent
22b74b3db6
commit
205bdc0272
1 changed files with 3 additions and 1 deletions
|
@ -349,7 +349,9 @@ end
|
||||||
|
|
||||||
-- Get's a player's entity by searching for it via an inputted string
|
-- Get's a player's entity by searching for it via an inputted string
|
||||||
function core:get_entity(ply)
|
function core:get_entity(ply)
|
||||||
if type(ply) == "Player" then
|
if ply == nil then
|
||||||
|
return nil
|
||||||
|
elseif type(ply) == "Player" then
|
||||||
return ply
|
return ply
|
||||||
elseif ply == "^" then
|
elseif ply == "^" then
|
||||||
return owner()
|
return owner()
|
||||||
|
|
Loading…
Reference in a new issue