aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 7229bec36..58611bed1 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -1078,7 +1078,8 @@ Server::Server(
// Initialize Environment
- m_env = new ServerEnvironment(new ServerMap(mapsavedir, this), m_lua, this);
+ m_env = new ServerEnvironment(new ServerMap(mapsavedir, this), m_lua,
+ this, this);
// Give environment reference to scripting api
scriptapi_add_environment(m_lua, m_env);
@@ -4590,6 +4591,14 @@ void Server::notifyPlayers(const std::wstring msg)
BroadcastChatMessage(msg);
}
+void Server::queueBlockEmerge(v3s16 blockpos, bool allow_generate)
+{
+ u8 flags = 0;
+ if(!allow_generate)
+ flags |= BLOCK_EMERGE_FLAG_FROMDISK;
+ m_emerge_queue.addBlock(PEER_ID_INEXISTENT, blockpos, flags);
+}
+
// IGameDef interface
// Under envlock
IToolDefManager* Server::getToolDefManager()