Fix table copy function, combat controls now hideable

This commit is contained in:
Henrique Santiago
2012-08-17 02:31:23 -03:00
parent 4793908657
commit 42ccff8596
3 changed files with 17 additions and 9 deletions

View File

@@ -16,7 +16,11 @@ end
function table.copy(t)
local res = {}
for k,v in pairs(t) do
res[k] = v
if type(v) == "table" then
res[k] = table.copy(v)
else
res[k] = v
end
end
return res
end