Skip to content

Commit

Permalink
lua: use item flags to names mapping when assigning a name in `edicts…
Browse files Browse the repository at this point in the history
….isitem()`

fix #111
  • Loading branch information
alexey-lysiuk committed Nov 7, 2023
1 parent d0fa464 commit 4f11ca2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Misc/qs_pak/scripts/edicts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,11 @@ function edicts.isitem(edict, current, choice)

local name = edict.netname

if name == '' then
if not name or name == '' then
name = itemnames[edict.items]
end

if not name then
-- use classname with prefix removed for entity without netname
name = classname:sub(prefixlen)
end
Expand Down

0 comments on commit 4f11ca2

Please sign in to comment.