aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2022-05-09 18:20:10 +0200
committersfan5 <sfan5@live.de>2022-05-10 22:37:42 +0200
commitec9f1575121e3b064b919bca7efddfa8b0fc4e65 (patch)
tree54d87ba45143f9d8d64e3ee3b8c36f6296627bdc /builtin
parent7f58887ae33893c981fbdff23d4e1fa4a11c32e4 (diff)
downloadminetest-ec9f1575121e3b064b919bca7efddfa8b0fc4e65.tar.gz
minetest-ec9f1575121e3b064b919bca7efddfa8b0fc4e65.tar.bz2
minetest-ec9f1575121e3b064b919bca7efddfa8b0fc4e65.zip
Use native packer to transfer globals into async env(s)
Diffstat (limited to 'builtin')
-rw-r--r--builtin/async/game.lua3
-rw-r--r--builtin/game/misc.lua2
2 files changed, 2 insertions, 3 deletions
diff --git a/builtin/async/game.lua b/builtin/async/game.lua
index 212a33e17..8cb9720b6 100644
--- a/builtin/async/game.lua
+++ b/builtin/async/game.lua
@@ -22,8 +22,7 @@ dofile(gamepath .. "voxelarea.lua")
-- Transfer of globals
do
- assert(core.transferred_globals)
- local all = core.deserialize(core.transferred_globals, true)
+ local all = assert(core.transferred_globals)
core.transferred_globals = nil
-- reassemble other tables
diff --git a/builtin/game/misc.lua b/builtin/game/misc.lua
index 9f5e3312b..997b1894a 100644
--- a/builtin/game/misc.lua
+++ b/builtin/game/misc.lua
@@ -262,5 +262,5 @@ function core.get_globals_to_transfer()
registered_items = copy_filtering(core.registered_items),
registered_aliases = core.registered_aliases,
}
- return core.serialize(all)
+ return all
end