1
0

Block entities now receive the cChunk param in their Tick() function

They can safely access that chunk and any of its neighbors during ticking.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1526 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2013-05-28 18:50:44 +00:00
parent 5c1439e11c
commit 3138daa1f8
10 changed files with 72 additions and 51 deletions

View File

@@ -452,7 +452,7 @@ void cChunk::Tick(float a_Dt)
// Tick all block entities in this chunk:
for (cBlockEntityList::iterator itr = m_BlockEntities.begin(); itr != m_BlockEntities.end(); ++itr)
{
m_IsDirty = (*itr)->Tick(a_Dt) | m_IsDirty;
m_IsDirty = (*itr)->Tick(a_Dt, *this) | m_IsDirty;
}
// Tick all entities in this chunk: