summaryrefslogtreecommitdiffstats
path: root/source/cPlugin_NewLua.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-24 11:49:00 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-24 11:49:00 +0200
commitf0fc0edd21b9340ce48561a5fceee29e4e055dff (patch)
tree658ec25a188e8ebe16ea43f201797601d6254d35 /source/cPlugin_NewLua.cpp
parentIgnore some runtime folders (diff)
downloadcuberite-f0fc0edd21b9340ce48561a5fceee29e4e055dff.tar
cuberite-f0fc0edd21b9340ce48561a5fceee29e4e055dff.tar.gz
cuberite-f0fc0edd21b9340ce48561a5fceee29e4e055dff.tar.bz2
cuberite-f0fc0edd21b9340ce48561a5fceee29e4e055dff.tar.lz
cuberite-f0fc0edd21b9340ce48561a5fceee29e4e055dff.tar.xz
cuberite-f0fc0edd21b9340ce48561a5fceee29e4e055dff.tar.zst
cuberite-f0fc0edd21b9340ce48561a5fceee29e4e055dff.zip
Diffstat (limited to '')
-rw-r--r--source/cPlugin_NewLua.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/source/cPlugin_NewLua.cpp b/source/cPlugin_NewLua.cpp
index a80c8c987..7341a572b 100644
--- a/source/cPlugin_NewLua.cpp
+++ b/source/cPlugin_NewLua.cpp
@@ -159,20 +159,23 @@ void cPlugin_NewLua::Tick(float a_Dt)
-bool cPlugin_NewLua::OnCollectItem( cPickup* a_Pickup, cPlayer* a_Player )
+bool cPlugin_NewLua::OnCollectPickup(cPlayer * a_Player, cPickup * a_Pickup)
{
- cCSLock Lock( m_CriticalSection );
- if( !PushFunction("OnCollectItem") )
+ cCSLock Lock(m_CriticalSection);
+ if (!PushFunction("OnCollectPickup"))
+ {
return false;
+ }
- tolua_pushusertype(m_LuaState, a_Pickup, "cPickup");
tolua_pushusertype(m_LuaState, a_Player, "cPlayer");
+ tolua_pushusertype(m_LuaState, a_Pickup, "cPickup");
- if( !CallFunction(2, 1, "OnCollectItem") )
+ if (!CallFunction(2, 1, "OnCollectPickup"))
+ {
return false;
+ }
- bool bRetVal = (tolua_toboolean( m_LuaState, -1, 0) > 0);
- return bRetVal;
+ return (tolua_toboolean(m_LuaState, -1, 0) > 0);
}