summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2009-03-30 10:56:00 +0100
committerDavid Athay <ko2fan@gmail.com>2009-03-30 10:56:00 +0100
commit59cdf04f88eb515fa349404992652ed004e9bb3e (patch)
tree9f5782ecad259bb3f142a41b818f66ee1d77edbf
parent3aabbb7ae82c818f584d95460181f70e05d41f32 (diff)
downloadmanaserv-59cdf04f88eb515fa349404992652ed004e9bb3e.tar.gz
manaserv-59cdf04f88eb515fa349404992652ed004e9bb3e.tar.bz2
manaserv-59cdf04f88eb515fa349404992652ed004e9bb3e.tar.xz
manaserv-59cdf04f88eb515fa349404992652ed004e9bb3e.zip
Added debugging
-rw-r--r--src/game-server/mapcomposite.cpp7
1 files changed, 7 insertions, 0 deletions
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));
}
}