summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-13 22:29:52 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-13 22:29:52 +0200
commit07cfe8ee35a7511c51bfd4ac98423a76eef411cb (patch)
tree9e35f8e9d350b0242dcf4622f5ab57b2c5879f73 /source
parentAdded logging to pickup collection when a player is near and when collecting. (diff)
downloadcuberite-07cfe8ee35a7511c51bfd4ac98423a76eef411cb.tar
cuberite-07cfe8ee35a7511c51bfd4ac98423a76eef411cb.tar.gz
cuberite-07cfe8ee35a7511c51bfd4ac98423a76eef411cb.tar.bz2
cuberite-07cfe8ee35a7511c51bfd4ac98423a76eef411cb.tar.lz
cuberite-07cfe8ee35a7511c51bfd4ac98423a76eef411cb.tar.xz
cuberite-07cfe8ee35a7511c51bfd4ac98423a76eef411cb.tar.zst
cuberite-07cfe8ee35a7511c51bfd4ac98423a76eef411cb.zip
Diffstat (limited to '')
-rw-r--r--source/Pickup.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/Pickup.cpp b/source/Pickup.cpp
index 7c1295121..c6f80495d 100644
--- a/source/Pickup.cpp
+++ b/source/Pickup.cpp
@@ -128,19 +128,24 @@ void cPickup::Tick(float a_Dt, cChunk & a_Chunk)
bool cPickup::CollectedBy(cPlayer * a_Dest)
{
+ ASSERT(a_Dest != NULL);
+
if (m_bCollected)
{
+ LOG("Pickup %d cannot be collected by \"%s\", because it has already been collected.", a_Dest->GetName().c_str(), m_UniqueID);
return false; // It's already collected!
}
// 800 is to long
if (m_Timer < 500.f)
{
+ LOG("Pickup %d cannot be collected by \"%s\", because it is not old enough.", a_Dest->GetName().c_str(), m_UniqueID);
return false; // Not old enough
}
if (cRoot::Get()->GetPluginManager()->CallHookCollectingPickup(a_Dest, *this))
{
+ LOG("Pickup %d cannot be collected by \"%s\", because a plugin has said no.", a_Dest->GetName().c_str(), m_UniqueID);
return false;
}
@@ -158,6 +163,7 @@ bool cPickup::CollectedBy(cPlayer * a_Dest)
return true;
}
+ LOG("Pickup %d cannot be collected by \"%s\", because there's no space in the inventory.", a_Dest->GetName().c_str(), m_UniqueID);
return false;
}