From 770486d2e11356951aaabcae53995b924eaf8510 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 6 Oct 2012 19:00:03 +0000 Subject: Removed a few debugging messages from the release builds. ( http://forum.mc-server.org/showthread.php?tid=571 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@936 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Defines.h | 2 ++ source/Entity.cpp | 2 +- source/Inventory.cpp | 6 +++--- source/Mobs/Monster.cpp | 9 +++++---- 4 files changed, 11 insertions(+), 8 deletions(-) (limited to 'source') diff --git a/source/Defines.h b/source/Defines.h index 4c6aef8cd..74a8c7b5c 100644 --- a/source/Defines.h +++ b/source/Defines.h @@ -132,6 +132,7 @@ inline void AddDirection( int & a_X, int & a_Y, int & a_Z, char a_Direction, boo default: { LOGWARNING("AddDirection(): Unknown direction: %d", a_Direction); + ASSERT(!"AddDirection(): Unknown direction"); break; } } @@ -149,6 +150,7 @@ inline void AddDirection( int & a_X, int & a_Y, int & a_Z, char a_Direction, boo default: { LOGWARNING("AddDirection(): Unknown inv direction: %d", a_Direction); + ASSERT(!"AddDirection(): Unknown direction"); break; } } diff --git a/source/Entity.cpp b/source/Entity.cpp index 6bc5dfc39..9bc0b3ae2 100644 --- a/source/Entity.cpp +++ b/source/Entity.cpp @@ -50,7 +50,7 @@ cEntity::cEntity(const double & a_X, const double & a_Y, const double & a_Z) cEntity::~cEntity() { - LOG("Deleting entity %d at pos {%.2f, %.2f} ~ [%d, %d]; ptr %p", + LOGD("Deleting entity %d at pos {%.2f, %.2f} ~ [%d, %d]; ptr %p", m_UniqueID, m_Pos.x, m_Pos.z, (int)(m_Pos.x / cChunkDef::Width), (int)(m_Pos.z / cChunkDef::Width), diff --git a/source/Inventory.cpp b/source/Inventory.cpp index c35a6c5d0..5ed2e0763 100644 --- a/source/Inventory.cpp +++ b/source/Inventory.cpp @@ -73,11 +73,11 @@ bool cInventory::AddItem( cItem & a_Item ) return false; } - for(unsigned int i = 0; i < c_NumSlots; i++) + for (unsigned int i = 0; i < c_NumSlots; i++) { - if( ChangedSlots[i] ) + if (ChangedSlots[i]) { - LOG("Item was added to %i ID:%i Count:%i", i, m_Slots[i].m_ItemID, m_Slots[i].m_ItemCount ); + LOGD("cInventory::AddItem(): Item was added to %i ID:%i Count:%i", i, m_Slots[i].m_ItemID, m_Slots[i].m_ItemCount); SendSlot(i); } } diff --git a/source/Mobs/Monster.cpp b/source/Mobs/Monster.cpp index 1a93f8d75..6a5a2d667 100644 --- a/source/Mobs/Monster.cpp +++ b/source/Mobs/Monster.cpp @@ -47,8 +47,8 @@ cMonster::cMonster() , m_AttackRate(3) , idle_interval(0) { - LOG("cMonster::cMonster()"); - LOG("In state: %s", GetState()); + LOGD("cMonster::cMonster()"); + LOGD("In state: %s", GetState()); m_bBurnable = true; m_MetaData = NORMAL; @@ -60,7 +60,7 @@ cMonster::cMonster() cMonster::~cMonster() { - LOG("cMonster::~cMonster()"); + LOGD("cMonster::~cMonster()"); } @@ -373,7 +373,8 @@ void cMonster::SetState(const AString & a_State) } else { - printf("Invalid State"); + LOGD("cMonster::SetState(): Invalid state"); + ASSERT(!"Invalid state"); } } -- cgit v1.2.3