fix: search global asset only if there is no local

This commit is contained in:
Kazhnuz 2021-01-23 11:28:40 +01:00
parent e5d8e699bc
commit 92c10440a1

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