1
0

Removed some more cChunkPtr usage

git-svn-id: http://mc-server.googlecode.com/svn/trunk@298 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2012-02-20 16:39:00 +00:00
parent 0b616909e3
commit d592882fe0
13 changed files with 372 additions and 114 deletions

View File

@@ -1148,7 +1148,7 @@ bool cChunk::HasAnyClients(void)
void cChunk::AddEntity( cEntity * a_Entity )
void cChunk::AddEntity( cEntity * a_Entity)
{
cCSLock Lock(m_CSEntities);
if (a_Entity->GetEntityType() != cEntity::E_PLAYER)
@@ -1171,9 +1171,13 @@ void cChunk::RemoveEntity(cEntity * a_Entity)
m_Entities.remove(a_Entity);
SizeAfter = m_Entities.size();
}
if ((a_Entity->GetEntityType() != cEntity::E_PLAYER) && (SizeBefore != SizeAfter))
if (SizeBefore != SizeAfter)
{
MarkDirty();
// Mark as dirty if it was a server-generated entity:
if (a_Entity->GetEntityType() != cEntity::E_PLAYER)
{
MarkDirty();
}
}
}