From 04151677d57905e35993eac4899e6bd72831ec6f Mon Sep 17 00:00:00 2001 From: mgueydan Date: Sun, 8 Sep 2013 01:43:55 +0200 Subject: Disabeling current mob spawning and tick --- source/Chunk.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/Chunk.cpp') diff --git a/source/Chunk.cpp b/source/Chunk.cpp index 35e44363e..1d649f3f6 100644 --- a/source/Chunk.cpp +++ b/source/Chunk.cpp @@ -533,10 +533,14 @@ void cChunk::Tick(float a_Dt) m_IsDirty = (*itr)->Tick(a_Dt, *this) | m_IsDirty; } - // Tick all entities in this chunk: + // Tick all entities in this chunk (except mobs): for (cEntityList::iterator itr = m_Entities.begin(); itr != m_Entities.end(); ++itr) { - (*itr)->Tick(a_Dt, *this); + // Mobs are tickes inside MobTick (as we don't have to tick them if they are far away from players) + if (!((*itr)->IsMob())) + { + (*itr)->Tick(a_Dt, *this); + } } // for itr - m_Entitites[] // Remove all entities that were scheduled for removal: -- cgit v1.2.3