summaryrefslogtreecommitdiffstats
path: root/source/cPlugin_Squirrel.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_Squirrel.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_Squirrel.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/cPlugin_Squirrel.cpp b/source/cPlugin_Squirrel.cpp
index f0152f240..bfd5a7037 100644
--- a/source/cPlugin_Squirrel.cpp
+++ b/source/cPlugin_Squirrel.cpp
@@ -99,13 +99,16 @@ void cPlugin_Squirrel::Tick(float a_Dt)
-bool cPlugin_Squirrel::OnCollectItem( cPickup* a_Pickup, cPlayer* a_Player )
+bool cPlugin_Squirrel::OnCollectPickup(cPlayer * a_Player, cPickup * a_Pickup)
{
- cCSLock Lock( m_CriticalSection );
+ cCSLock Lock(m_CriticalSection);
- if(!m_Plugin->HasFunction("OnCollectItem")) return false;
+ if (!m_Plugin->HasFunction("OnCollectPickup"))
+ {
+ return false;
+ }
- return m_Plugin->GetFunction("OnCollectItem").Evaluate<bool>(a_Pickup, a_Player);
+ return m_Plugin->GetFunction("OnCollectPickup").Evaluate<bool>(a_Player, a_Pickup);
}