aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/debug.h5
-rw-r--r--src/map.cpp8
-rw-r--r--src/mapblockobject.cpp10
3 files changed, 13 insertions, 10 deletions
diff --git a/src/debug.h b/src/debug.h
index 5cc1e6c4d..234b7c74a 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -169,7 +169,10 @@ private:
bool m_overflowed;
};
-#define DSTACK(...)\
+#define DSTACK(msg)\
+ DebugStacker __debug_stacker(msg);
+
+#define DSTACKF(...)\
char __buf[DEBUG_STACK_TEXT_SIZE];\
snprintf(__buf,\
DEBUG_STACK_TEXT_SIZE, __VA_ARGS__);\
diff --git a/src/map.cpp b/src/map.cpp
index 02614e1ae..63f01ddee 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -3830,7 +3830,7 @@ MapChunk* ServerMap::generateChunk(v2s16 chunkpos1,
ServerMapSector * ServerMap::createSector(v2s16 p2d)
{
- DSTACK("%s: p2d=(%d,%d)",
+ DSTACKF("%s: p2d=(%d,%d)",
__FUNCTION_NAME,
p2d.X, p2d.Y);
@@ -3982,7 +3982,7 @@ MapBlock * ServerMap::generateBlock(
core::map<v3s16, MapBlock*> &lighting_invalidated_blocks
)
{
- DSTACK("%s: p=(%d,%d,%d)",
+ DSTACKF("%s: p=(%d,%d,%d)",
__FUNCTION_NAME,
p.X, p.Y, p.Z);
@@ -4618,7 +4618,7 @@ continue_generating:
MapBlock * ServerMap::createBlock(v3s16 p)
{
- DSTACK("%s: p=(%d,%d,%d)",
+ DSTACKF("%s: p=(%d,%d,%d)",
__FUNCTION_NAME, p.X, p.Y, p.Z);
/*
@@ -4682,7 +4682,7 @@ MapBlock * ServerMap::emergeBlock(
core::map<v3s16, MapBlock*> &lighting_invalidated_blocks
)
{
- DSTACK("%s: p=(%d,%d,%d), only_from_disk=%d",
+ DSTACKF("%s: p=(%d,%d,%d), only_from_disk=%d",
__FUNCTION_NAME,
p.X, p.Y, p.Z, only_from_disk);
diff --git a/src/mapblockobject.cpp b/src/mapblockobject.cpp
index 343926f81..d05eee808 100644
--- a/src/mapblockobject.cpp
+++ b/src/mapblockobject.cpp
@@ -63,7 +63,7 @@ v3f MovingObject::getAbsoluteShowPos()
void MovingObject::move(float dtime, v3f acceleration)
{
- DSTACK("%s: typeid=%i, pos=(%f,%f,%f), speed=(%f,%f,%f)"
+ DSTACKF("%s: typeid=%i, pos=(%f,%f,%f), speed=(%f,%f,%f)"
", dtime=%f, acc=(%f,%f,%f)",
__FUNCTION_NAME,
getTypeId(),
@@ -755,7 +755,7 @@ void MapBlockObjectList::step(float dtime, bool server, u32 daynight_ratio)
core::map<s16, bool> ids_to_delete;
{
- DSTACK("%s: stepping objects", __FUNCTION_NAME);
+ DSTACKF("%s: stepping objects", __FUNCTION_NAME);
for(core::map<s16, MapBlockObject*>::Iterator
i = m_objects.getIterator();
@@ -763,7 +763,7 @@ void MapBlockObjectList::step(float dtime, bool server, u32 daynight_ratio)
{
MapBlockObject *obj = i.getNode()->getValue();
- DSTACK("%s: stepping object type %i", __FUNCTION_NAME,
+ DSTACKF("%s: stepping object type %i", __FUNCTION_NAME,
obj->getTypeId());
if(server)
@@ -791,7 +791,7 @@ void MapBlockObjectList::step(float dtime, bool server, u32 daynight_ratio)
}
{
- DSTACK("%s: deleting objects", __FUNCTION_NAME);
+ DSTACKF("%s: deleting objects", __FUNCTION_NAME);
// Delete objects in delete queue
for(core::map<s16, bool>::Iterator
@@ -815,7 +815,7 @@ void MapBlockObjectList::step(float dtime, bool server, u32 daynight_ratio)
return;
{
- DSTACK("%s: object wrap loop", __FUNCTION_NAME);
+ DSTACKF("%s: object wrap loop", __FUNCTION_NAME);
for(core::map<s16, MapBlockObject*>::Iterator
i = m_objects.getIterator();