From 59cdf04f88eb515fa349404992652ed004e9bb3e Mon Sep 17 00:00:00 2001 From: David Athay Date: Mon, 30 Mar 2009 10:56:00 +0100 Subject: Added debugging --- src/game-server/mapcomposite.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/game-server/mapcomposite.cpp b/src/game-server/mapcomposite.cpp index b9e4b863..137622d5 100644 --- a/src/game-server/mapcomposite.cpp +++ b/src/game-server/mapcomposite.cpp @@ -275,6 +275,7 @@ int ObjectBucket::allocate() // Any free ID in the bucket? if (!free) { + LOG_INFO("No free id in bucket"); return -1; } @@ -313,6 +314,7 @@ int ObjectBucket::allocate() } // No free ID in the bucket. + LOG_INFO("No free id in the bucket"); return -1; } @@ -369,6 +371,7 @@ bool MapContent::allocate(MovingObject *obj) new bucket. */ b = new ObjectBucket; buckets[i] = b; + LOG_INFO("New bucket created"); } int j = b->allocate(); if (j >= 0) @@ -381,6 +384,7 @@ bool MapContent::allocate(MovingObject *obj) } // All the IDs are currently used, fail. + LOG_ERROR("unable to allocate id"); return false; } @@ -510,6 +514,9 @@ void MapComposite::remove(Thing *ptr) if (ptr->canMove()) { + std::stringstream str; + str << "Deallocating " << ptr->getType(); + LOG_INFO(str.str()); mContent->deallocate(static_cast< MovingObject * >(ptr)); } } -- cgit v1.2.3-70-g09d2