From fd26595b56495f50f0750635c330eb4337380048 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Mon, 13 May 2013 20:26:45 +0000 Subject: Added logging to pickup collection when a player is near and when collecting. This should help fix the inactive pickups bug, http://forum.mc-server.org/showthread.php?tid=434&pid=8019#pid8019 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1480 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Chunk.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/Chunk.cpp') diff --git a/source/Chunk.cpp b/source/Chunk.cpp index 0e10afd55..c8cceb6ed 100644 --- a/source/Chunk.cpp +++ b/source/Chunk.cpp @@ -1565,9 +1565,18 @@ 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(*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 + ); + } } } -- cgit v1.2.3