summaryrefslogtreecommitdiffstats
path: root/source/Chunk.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-21 13:52:14 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-21 13:52:14 +0100
commitafaf104b4086dbc5245f92a209cb68a088780ebb (patch)
tree82bdb4f173cda642566206066f8fdd27b9f725b5 /source/Chunk.cpp
parentAdded "Latest version" to the PrimaryServerVersion in webadmin settings (patch contributed by STR_Warrior) (diff)
downloadcuberite-afaf104b4086dbc5245f92a209cb68a088780ebb.tar
cuberite-afaf104b4086dbc5245f92a209cb68a088780ebb.tar.gz
cuberite-afaf104b4086dbc5245f92a209cb68a088780ebb.tar.bz2
cuberite-afaf104b4086dbc5245f92a209cb68a088780ebb.tar.lz
cuberite-afaf104b4086dbc5245f92a209cb68a088780ebb.tar.xz
cuberite-afaf104b4086dbc5245f92a209cb68a088780ebb.tar.zst
cuberite-afaf104b4086dbc5245f92a209cb68a088780ebb.zip
Diffstat (limited to 'source/Chunk.cpp')
-rw-r--r--source/Chunk.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/Chunk.cpp b/source/Chunk.cpp
index 5dc19915a..165eda831 100644
--- a/source/Chunk.cpp
+++ b/source/Chunk.cpp
@@ -115,7 +115,7 @@ cChunk::~cChunk()
cEntityList Entities;
for (cEntityList::const_iterator itr = m_Entities.begin(); itr != m_Entities.end(); ++itr)
{
- if ((*itr)->GetEntityType() != cEntity::eEntityType_Player)
+ if (!(*itr)->IsPlayer())
{
Entities.push_back(*itr);
}
@@ -1382,7 +1382,7 @@ void cChunk::CollectPickupsByPlayer(cPlayer * a_Player)
for (cEntityList::iterator itr = m_Entities.begin(); itr != m_Entities.end(); ++itr)
{
- if ( (*itr)->GetEntityType() != cEntity::eEntityType_Pickup )
+ if (!(*itr)->IsPickup())
{
continue; // Only pickups
}
@@ -1515,13 +1515,13 @@ bool cChunk::HasAnyClients(void)
-void cChunk::AddEntity( cEntity * a_Entity)
+void cChunk::AddEntity(cEntity * a_Entity)
{
- if (a_Entity->GetEntityType() != cEntity::eEntityType_Player)
+ if (!a_Entity->IsPlayer())
{
MarkDirty();
}
- m_Entities.push_back( a_Entity );
+ m_Entities.push_back(a_Entity);
}
@@ -1537,7 +1537,7 @@ void cChunk::RemoveEntity(cEntity * a_Entity)
if (SizeBefore != SizeAfter)
{
// Mark as dirty if it was a server-generated entity:
- if (a_Entity->GetEntityType() != cEntity::eEntityType_Player)
+ if (!a_Entity->IsPlayer())
{
MarkDirty();
}