1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Async environment for mods to do concurrent tasks (#11131)

This commit is contained in:
sfan5 2022-05-02 20:55:04 +02:00
parent 663c936428
commit e7659883cc
38 changed files with 1646 additions and 48 deletions

View file

@ -243,6 +243,7 @@ Server::Server(
m_clients(m_con),
m_admin_chat(iface),
m_on_shutdown_errmsg(on_shutdown_errmsg),
m_async_globals_data(""),
m_modchannel_mgr(new ModChannelMgr())
{
if (m_path_world.empty())
@ -480,6 +481,9 @@ void Server::init()
// Give environment reference to scripting api
m_script->initializeEnvironment(m_env);
// Do this after regular script init is done
m_script->initAsync();
// Register us to receive map edit events
servermap->addEventReceiver(this);