Merge branch 'master' into ChunkLoader
Conflicts: src/ChunkSender.cpp src/ClientHandle.cpp src/World.h
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user