Skip to content

Commit

Permalink
lua: improve item detection in honey mod
Browse files Browse the repository at this point in the history
item that is not spawned yet is now detected properly
fix #222
  • Loading branch information
alexey-lysiuk committed Nov 22, 2024
1 parent bbb2140 commit 9acf7a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Misc/qs_pak/scripts/edicts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,10 @@ function edicts.isitem(edict)
return
end

if edict.solid ~= SOLID_TRIGGER then
local isinteractible = edict.solid == SOLID_TRIGGER
or (detectmod() == mods.HONEY and edict.use == 'item_spawn()')

if not isinteractible then
-- Skip object if it's not interactible, e.g. if it's a picked up item
return
end
Expand Down

0 comments on commit 9acf7a8

Please sign in to comment.