aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-25 19:49:20 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:52 +0200
commit9e7ad1e2aa832ff93a623e7a1531cee1f1e79ef7 (patch)
tree92ebc9ff4a3750206f52b52858de1a4289d6f16d /src/server.cpp
parentae9f183cda7046028e6d74972922dc41cf6039bf (diff)
downloadminetest-9e7ad1e2aa832ff93a623e7a1531cee1f1e79ef7.tar.gz
minetest-9e7ad1e2aa832ff93a623e7a1531cee1f1e79ef7.tar.bz2
minetest-9e7ad1e2aa832ff93a623e7a1531cee1f1e79ef7.zip
Add object reference to Lua on_place/dig/punchnode parameters
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 12026054e..fea103e1c 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -2529,7 +2529,8 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
/*
Run script hook
*/
- scriptapi_environment_on_punchnode(m_lua, p_under, n);
+ ServerRemotePlayer *srp = (ServerRemotePlayer*)player;
+ scriptapi_environment_on_punchnode(m_lua, p_under, n, srp);
} // action == 0
@@ -2769,7 +2770,8 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
/*
Run script hook
*/
- scriptapi_environment_on_dignode(m_lua, p_under, n);
+ ServerRemotePlayer *srp = (ServerRemotePlayer*)player;
+ scriptapi_environment_on_dignode(m_lua, p_under, n, srp);
}
/*
@@ -2916,7 +2918,8 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
/*
Run script hook
*/
- scriptapi_environment_on_placenode(m_lua, p_over, n);
+ ServerRemotePlayer *srp = (ServerRemotePlayer*)player;
+ scriptapi_environment_on_placenode(m_lua, p_over, n, srp);
/*
Calculate special events