Skip to content

Commit

Permalink
Fix trace not working for entity subtypes (#1832)
Browse files Browse the repository at this point in the history
  • Loading branch information
thegrb93 authored Aug 21, 2024
1 parent e18eafb commit 934c1d9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lua/starfall/libs_sh/trace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ local function convertFilter(filter)
if filter == nil then
return nil
elseif istable(filter) then
if debug.getmetatable(filter)~=ent_meta then
local meta = debug.getmetatable(filter)
if meta==ent_meta or (meta and meta.supertype==ent_meta) then
return eunwrap(filter)
else
local l = {}
for i, v in ipairs(filter) do
l[i] = eunwrap(v)
end
return l
else
return eunwrap(filter)
end
elseif isfunction(filter) then
return function(ent)
Expand Down

0 comments on commit 934c1d9

Please sign in to comment.