1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Make blocks to be loaded from disk when the active block area reaches them

This commit is contained in:
Perttu Ahola 2011-11-27 12:50:35 +02:00
parent ec4f58741b
commit 5c1cb01936
4 changed files with 31 additions and 5 deletions

View file

@ -120,6 +120,12 @@ public:
private:
};
class IBackgroundBlockEmerger
{
public:
virtual void queueBlockEmerge(v3s16 blockpos, bool allow_generate)=0;
};
/*
The server-side environment.
@ -129,7 +135,8 @@ private:
class ServerEnvironment : public Environment
{
public:
ServerEnvironment(ServerMap *map, lua_State *L, IGameDef *gamedef);
ServerEnvironment(ServerMap *map, lua_State *L, IGameDef *gamedef,
IBackgroundBlockEmerger *emerger);
~ServerEnvironment();
Map & getMap()
@ -279,6 +286,8 @@ private:
lua_State *m_lua;
// Game definition
IGameDef *m_gamedef;
// Background block emerger (the server, in practice)
IBackgroundBlockEmerger *m_emerger;
// Active object list
core::map<u16, ServerActiveObject*> m_active_objects;
// Outgoing network message buffer for active objects