1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-12-22 23:10:17 +01:00

Use a local for the globalstep function

This commit is contained in:
LoneWolfHT 2022-02-07 11:47:25 -08:00 committed by Lars Müller
parent f665382017
commit 268a8844b6

View File

@ -211,8 +211,11 @@ function player_api.globalstep()
end end
-- Mods can modify the globalstep by overriding player_api.globalstep -- Mods can modify the globalstep by overriding player_api.globalstep
-- local for speed
local player_api_globalstep = player_api.globalstep
minetest.register_globalstep(function(...) minetest.register_globalstep(function(...)
player_api.globalstep(players, ...) player_api_globalstep(players, ...)
end) end)
for _, api_function in pairs({"get_animation", "set_animation", "set_model", "set_textures"}) do for _, api_function in pairs({"get_animation", "set_animation", "set_model", "set_textures"}) do