diff options
-rw-r--r-- | source/Defines.h | 2 | ||||
-rw-r--r-- | source/Entity.cpp | 2 | ||||
-rw-r--r-- | source/Inventory.cpp | 6 | ||||
-rw-r--r-- | source/Mobs/Monster.cpp | 9 |
4 files changed, 11 insertions, 8 deletions
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"); } } |