diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-20 17:39:00 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-20 17:39:00 +0100 |
commit | d592882fe0d1e7762470e6b5eff2b14ed26f1e69 (patch) | |
tree | 2a9a9fc2a7f6efe75c19511425ad611ad1996fed /source/cChunk.cpp | |
parent | Using own ASSERT() that logs to file (diff) | |
download | cuberite-d592882fe0d1e7762470e6b5eff2b14ed26f1e69.tar cuberite-d592882fe0d1e7762470e6b5eff2b14ed26f1e69.tar.gz cuberite-d592882fe0d1e7762470e6b5eff2b14ed26f1e69.tar.bz2 cuberite-d592882fe0d1e7762470e6b5eff2b14ed26f1e69.tar.lz cuberite-d592882fe0d1e7762470e6b5eff2b14ed26f1e69.tar.xz cuberite-d592882fe0d1e7762470e6b5eff2b14ed26f1e69.tar.zst cuberite-d592882fe0d1e7762470e6b5eff2b14ed26f1e69.zip |
Diffstat (limited to 'source/cChunk.cpp')
-rw-r--r-- | source/cChunk.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp index 827e97cb9..9f64716d0 100644 --- a/source/cChunk.cpp +++ b/source/cChunk.cpp @@ -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();
+ }
}
}
|