diff options
-rw-r--r-- | source/Chunk.cpp | 4 | ||||
-rw-r--r-- | source/Pickup.cpp | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/source/Chunk.cpp b/source/Chunk.cpp index c8cceb6ed..72313fa08 100644 --- a/source/Chunk.cpp +++ b/source/Chunk.cpp @@ -1565,17 +1565,21 @@ void cChunk::CollectPickupsByPlayer(cPlayer * a_Player) float SqrDist = DiffX * DiffX + DiffY * DiffY + DiffZ * DiffZ; if (SqrDist < 1.5f * 1.5f) // 1.5 block { + /* LOG("Pickup %d being collected by player \"%s\", distance %f", (*itr)->GetUniqueID(), a_Player->GetName().c_str(), SqrDist ); + */ MarkDirty(); (reinterpret_cast<cPickup *>(*itr))->CollectedBy( a_Player ); } else if (SqrDist < 5 * 5) { + /* LOG("Pickup %d close to player \"%s\", but still too far to collect: %f", (*itr)->GetUniqueID(), a_Player->GetName().c_str(), SqrDist ); + */ } } } diff --git a/source/Pickup.cpp b/source/Pickup.cpp index 76f0701f2..bf48daf82 100644 --- a/source/Pickup.cpp +++ b/source/Pickup.cpp @@ -132,20 +132,20 @@ bool cPickup::CollectedBy(cPlayer * a_Dest) if (m_bCollected) { - LOG("Pickup %d cannot be collected by \"%s\", because it has already been collected.", m_UniqueID, a_Dest->GetName().c_str()); + // LOG("Pickup %d cannot be collected by \"%s\", because it has already been collected.", m_UniqueID, a_Dest->GetName().c_str()); 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.", m_UniqueID, a_Dest->GetName().c_str()); + // LOG("Pickup %d cannot be collected by \"%s\", because it is not old enough.", m_UniqueID, a_Dest->GetName().c_str()); 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.", m_UniqueID, a_Dest->GetName().c_str()); + // LOG("Pickup %d cannot be collected by \"%s\", because a plugin has said no.", m_UniqueID, a_Dest->GetName().c_str()); return false; } @@ -163,7 +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); + // 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; } |