diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-10-06 21:00:03 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-10-06 21:00:03 +0200 |
commit | 770486d2e11356951aaabcae53995b924eaf8510 (patch) | |
tree | e81c1f5651b352771fc75a1ad0c5cf3c813c87c1 /source | |
parent | Fixed player respawning crashing the server. (diff) | |
download | cuberite-770486d2e11356951aaabcae53995b924eaf8510.tar cuberite-770486d2e11356951aaabcae53995b924eaf8510.tar.gz cuberite-770486d2e11356951aaabcae53995b924eaf8510.tar.bz2 cuberite-770486d2e11356951aaabcae53995b924eaf8510.tar.lz cuberite-770486d2e11356951aaabcae53995b924eaf8510.tar.xz cuberite-770486d2e11356951aaabcae53995b924eaf8510.tar.zst cuberite-770486d2e11356951aaabcae53995b924eaf8510.zip |
Diffstat (limited to 'source')
-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"); } } |