summaryrefslogtreecommitdiffstats
path: root/src/ChunkSender.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-10-23 14:59:42 +0200
committerHowaner <franzi.moos@googlemail.com>2014-10-23 14:59:42 +0200
commit72bb299a4a4f74840c3b368c6669ddc3d32006ee (patch)
tree748fee756010b1f36aa95162f762e21ee0d19c0a /src/ChunkSender.cpp
parentMerge branch 'master' into ChunkLoader (diff)
parentFixed a crash in redstone simulator. (diff)
downloadcuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar
cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.gz
cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.bz2
cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.lz
cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.xz
cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.zst
cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.zip
Diffstat (limited to '')
-rw-r--r--src/ChunkSender.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ChunkSender.cpp b/src/ChunkSender.cpp
index fdcd485a9..7e2301eab 100644
--- a/src/ChunkSender.cpp
+++ b/src/ChunkSender.cpp
@@ -35,9 +35,9 @@ void cNotifyChunkSender::Call(int a_ChunkX, int a_ChunkZ)
cChunkSender::cChunkSender(void) :
super("ChunkSender"),
- m_World(NULL),
+ m_World(nullptr),
m_RemoveCount(0),
- m_Notify(NULL)
+ m_Notify(nullptr)
{
m_Notify.SetChunkSender(this);
}
@@ -93,7 +93,7 @@ void cChunkSender::ChunkReady(int a_ChunkX, int a_ChunkZ)
void cChunkSender::QueueSendChunkTo(int a_ChunkX, int a_ChunkZ, eChunkPriority a_Priority, cClientHandle * a_Client)
{
- ASSERT(a_Client != NULL);
+ ASSERT(a_Client != nullptr);
{
sSendChunk Chunk(a_ChunkX, a_ChunkZ, a_Client);
@@ -189,7 +189,7 @@ void cChunkSender::Execute(void)
m_ChunksReady.pop_front();
Lock.Unlock();
- SendChunk(Coords.m_ChunkX, Coords.m_ChunkZ, NULL);
+ SendChunk(Coords.m_ChunkX, Coords.m_ChunkZ, nullptr);
}
else
{
@@ -217,10 +217,10 @@ void cChunkSender::Execute(void)
void cChunkSender::SendChunk(int a_ChunkX, int a_ChunkZ, cClientHandle * a_Client)
{
- ASSERT(m_World != NULL);
+ ASSERT(m_World != nullptr);
// Ask the client if it still wants the chunk:
- if ((a_Client != NULL) && !a_Client->WantsSendChunk(a_ChunkX, a_ChunkZ))
+ if ((a_Client != nullptr) && !a_Client->WantsSendChunk(a_ChunkX, a_ChunkZ))
{
return;
}
@@ -252,7 +252,7 @@ void cChunkSender::SendChunk(int a_ChunkX, int a_ChunkZ, cClientHandle * a_Clien
cChunkDataSerializer Data(m_BlockTypes, m_BlockMetas, m_BlockLight, m_BlockSkyLight, m_BiomeMap);
// Send:
- if (a_Client == NULL)
+ if (a_Client == nullptr)
{
m_World->BroadcastChunkData(a_ChunkX, a_ChunkZ, Data);
}
@@ -264,7 +264,7 @@ void cChunkSender::SendChunk(int a_ChunkX, int a_ChunkZ, cClientHandle * a_Clien
// Send block-entity packets:
for (sBlockCoords::iterator itr = m_BlockEntities.begin(); itr != m_BlockEntities.end(); ++itr)
{
- if (a_Client == NULL)
+ if (a_Client == nullptr)
{
m_World->BroadcastBlockEntity(itr->m_BlockX, itr->m_BlockY, itr->m_BlockZ);
}