From 5c1cb01936093fc7e57d4b6d7a170dff9a18cd7d Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 27 Nov 2011 12:50:35 +0200 Subject: Make blocks to be loaded from disk when the active block area reaches them --- src/environment.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/environment.h') diff --git a/src/environment.h b/src/environment.h index 1abf73867..48e9cfa75 100644 --- a/src/environment.h +++ b/src/environment.h @@ -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 m_active_objects; // Outgoing network message buffer for active objects -- cgit v1.2.3