mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 17:35:37 +02:00
Revert "Clean up some getServer() unsafety"
Turned out to not be a good idea.
This reverts commit 58eccc7a2a
.
This commit is contained in:
@@ -192,10 +192,8 @@ void ServerScripting::InitializeAsync(lua_State *L, int top)
|
||||
LuaVoxelManip::Register(L);
|
||||
LuaSettings::Register(L);
|
||||
|
||||
// pull the globals data from the server
|
||||
auto *server = dynamic_cast<Server*>(ModApiBase::getGameDef(L));
|
||||
assert(server);
|
||||
auto *data = server->m_lua_globals_data.get();
|
||||
// globals data
|
||||
auto *data = ModApiBase::getServer(L)->m_lua_globals_data.get();
|
||||
assert(data);
|
||||
script_unpack(L, data);
|
||||
lua_setfield(L, top, "transferred_globals");
|
||||
|
Reference in New Issue
Block a user