From 268a8844b614b08ea5c05188379c9cc6182269cd Mon Sep 17 00:00:00 2001 From: LoneWolfHT Date: Mon, 7 Feb 2022 11:47:25 -0800 Subject: [PATCH] Use a local for the globalstep function --- mods/player_api/api.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mods/player_api/api.lua b/mods/player_api/api.lua index 12d23bcb..8517d58a 100644 --- a/mods/player_api/api.lua +++ b/mods/player_api/api.lua @@ -211,8 +211,11 @@ function player_api.globalstep() end -- Mods can modify the globalstep by overriding player_api.globalstep + +-- local for speed +local player_api_globalstep = player_api.globalstep minetest.register_globalstep(function(...) - player_api.globalstep(players, ...) + player_api_globalstep(players, ...) end) for _, api_function in pairs({"get_animation", "set_animation", "set_model", "set_textures"}) do