summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-09 14:42:28 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-09 14:42:28 +0100
commitf43b65cf53274d1bbb43e2041ce72ff9eb68a7c8 (patch)
tree6799433ae65c4d4331bbfd6bcabe5bac38f6376c /source/cChunk.cpp
parentUsing the _DEBUG macro for *nix debug builds as well; trying to force 8-byte alignment on critical sections ( http://forum.mc-server.org/showthread.php?tid=384 ) (diff)
downloadcuberite-f43b65cf53274d1bbb43e2041ce72ff9eb68a7c8.tar
cuberite-f43b65cf53274d1bbb43e2041ce72ff9eb68a7c8.tar.gz
cuberite-f43b65cf53274d1bbb43e2041ce72ff9eb68a7c8.tar.bz2
cuberite-f43b65cf53274d1bbb43e2041ce72ff9eb68a7c8.tar.lz
cuberite-f43b65cf53274d1bbb43e2041ce72ff9eb68a7c8.tar.xz
cuberite-f43b65cf53274d1bbb43e2041ce72ff9eb68a7c8.tar.zst
cuberite-f43b65cf53274d1bbb43e2041ce72ff9eb68a7c8.zip
Diffstat (limited to '')
-rw-r--r--source/cChunk.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp
index 48d2bc086..2780af2a8 100644
--- a/source/cChunk.cpp
+++ b/source/cChunk.cpp
@@ -108,7 +108,7 @@ cChunk::~cChunk()
cEntityList Entities;
for (cEntityList::const_iterator itr = m_Entities.begin(); itr != m_Entities.end(); ++itr)
{
- if ((*itr)->GetEntityType() != cEntity::E_PLAYER)
+ if ((*itr)->GetEntityType() != cEntity::eEntityType_Player)
{
Entities.push_back(*itr);
}
@@ -218,18 +218,18 @@ void cChunk::MarkLoadFailed(void)
-void cChunk::GetAllData(cChunkDataCallback * a_Callback)
+void cChunk::GetAllData(cChunkDataCallback & a_Callback)
{
- a_Callback->BlockData(m_BlockData);
+ a_Callback.BlockData(m_BlockData);
for (cEntityList::iterator itr = m_Entities.begin(); itr != m_Entities.end(); ++itr)
{
- a_Callback->Entity(*itr);
+ a_Callback.Entity(*itr);
}
for (cBlockEntityList::iterator itr = m_BlockEntities.begin(); itr != m_BlockEntities.end(); ++itr)
{
- a_Callback->BlockEntity(*itr);
+ a_Callback.BlockEntity(*itr);
}
}
@@ -244,7 +244,7 @@ void cChunk::SetAllData(const char * a_BlockData, cEntityList & a_Entities, cBlo
// Clear the internal entities:
for (cEntityList::iterator itr = m_Entities.begin(); itr != m_Entities.end(); ++itr)
{
- if ((*itr)->GetEntityType() == cEntity::E_PLAYER)
+ if ((*itr)->GetEntityType() == cEntity::eEntityType_Player)
{
// Move players into the new entity list
a_Entities.push_back(*itr);
@@ -1102,7 +1102,7 @@ void cChunk::CollectPickupsByPlayer(cPlayer * a_Player)
for (cEntityList::iterator itr = m_Entities.begin(); itr != m_Entities.end(); ++itr)
{
- if ( (*itr)->GetEntityType() != cEntity::E_PICKUP )
+ if ( (*itr)->GetEntityType() != cEntity::eEntityType_Pickup )
{
continue; // Only pickups
}
@@ -1229,7 +1229,7 @@ bool cChunk::HasAnyClients(void)
void cChunk::AddEntity( cEntity * a_Entity)
{
- if (a_Entity->GetEntityType() != cEntity::E_PLAYER)
+ if (a_Entity->GetEntityType() != cEntity::eEntityType_Player)
{
MarkDirty();
}
@@ -1249,7 +1249,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::E_PLAYER)
+ if (a_Entity->GetEntityType() != cEntity::eEntityType_Player)
{
MarkDirty();
}