summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-05 18:58:29 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-05 18:58:29 +0200
commit156c9851b8a099656fa86ea52d989e35e5b7ebf1 (patch)
treef2d8b111aee03dba8f37a8c9bd04952ff1b7926c /src/Chunk.cpp
parentFixed decision failure (diff)
downloadcuberite-156c9851b8a099656fa86ea52d989e35e5b7ebf1.tar
cuberite-156c9851b8a099656fa86ea52d989e35e5b7ebf1.tar.gz
cuberite-156c9851b8a099656fa86ea52d989e35e5b7ebf1.tar.bz2
cuberite-156c9851b8a099656fa86ea52d989e35e5b7ebf1.tar.lz
cuberite-156c9851b8a099656fa86ea52d989e35e5b7ebf1.tar.xz
cuberite-156c9851b8a099656fa86ea52d989e35e5b7ebf1.tar.zst
cuberite-156c9851b8a099656fa86ea52d989e35e5b7ebf1.zip
Diffstat (limited to '')
-rw-r--r--src/Chunk.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index c6122852a..2850dd93b 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -580,7 +580,10 @@ void cChunk::Tick(float a_Dt)
{
// Mobs are tickes inside MobTick (as we don't have to tick them if they are far away from players)
// Don't tick things queued to be removed
- if (!((*itr)->IsMob()) && (std::find(m_EntitiesToRemove.begin(), m_EntitiesToRemove.end(), (*itr)->GetUniqueID()) == m_EntitiesToRemove.end()))
+ if (
+ !((*itr)->IsMob()) &&
+ (std::find(m_EntitiesToRemove.begin(), m_EntitiesToRemove.end(), (*itr)->GetUniqueID()) == m_EntitiesToRemove.end())
+ )
{
(*itr)->Tick(a_Dt, *this);
}
@@ -588,7 +591,7 @@ void cChunk::Tick(float a_Dt)
for (cEntityList::iterator itr = m_Entities.begin(); itr != m_Entities.end();)
{
- std::vector<int>::const_iterator itr2 = std::find(m_EntitiesToRemove.begin(), m_EntitiesToRemove.end(), (*itr)->GetUniqueID());
+ std::vector<int>::iterator itr2 = std::find(m_EntitiesToRemove.begin(), m_EntitiesToRemove.end(), (*itr)->GetUniqueID());
if (itr2 != m_EntitiesToRemove.end())
{
itr = m_Entities.erase(itr);