fix: search global asset only if there is no local

This commit is contained in:
Kazhnuz Klappsthul 2021-01-23 11:28:40 +01:00
parent e5d8e699bc
commit 92c10440a1
1 changed files with 3 additions and 2 deletions

View File

@ -70,13 +70,14 @@ function AssetManager:get(name)
local asset
if self.locals[name] ~= nil then
asset = self.locals[name]
else
asset = self.globals[name]
end
asset = self.globals[name]
if (asset ~= nil) then
return asset
else
core.debug:fail("birb.modules.assets", "L'asset " .. name .. " n'existe pas.")
core.debug:fail("core.assets", "L'asset " .. name .. " n'existe pas.")
end
end