Skip to content

Commit

Permalink
Fix duplicate global that should have caused issues
Browse files Browse the repository at this point in the history
  • Loading branch information
TheHorscht committed May 11, 2023
1 parent 38a4a17 commit 34e2944
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions EZWand.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ dofile_once("data/scripts/gun/procedural/wands.lua")
-- Removes spells from a table whose ID is not found in the gun_actions table
local function filter_spells(spells)
dofile_once("data/scripts/gun/gun_actions.lua")
if not spell_lookup then
spell_lookup = {}
if not spell_exist_lookup then
spell_exist_lookup = {}
for i, v in ipairs(actions) do
spell_lookup[v.id] = true
spell_exist_lookup[v.id] = true
end
end
local out = {}
for i, spell in ipairs(spells) do
if spell == "" or spell_lookup[spell] then
if spell == "" or spell_exist_lookup[spell] then
table.insert(out, spell)
end
end
Expand Down

0 comments on commit 34e2944

Please sign in to comment.