aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 894c3d362..467153031 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -2527,10 +2527,11 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
u8 mineral = MINERAL_NONE;
bool cannot_remove_node = false;
-
+
+ MapNode n(CONTENT_IGNORE);
try
{
- MapNode n = m_env->getMap().getNode(p_under);
+ n = m_env->getMap().getNode(p_under);
// Get mineral
mineral = n.getMineral(m_nodedef);
// Get material at position
@@ -2734,6 +2735,11 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
continue;
client->SetBlocksNotSent(modified_blocks);
}
+
+ /*
+ Run script hook
+ */
+ scriptapi_environment_on_dignode(m_lua, p_under, n);
}
/*
@@ -2878,6 +2884,11 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
}
/*
+ Run script hook
+ */
+ scriptapi_environment_on_placenode(m_lua, p_over, n);
+
+ /*
Calculate special events
*/