1
0

Reverse order of ChunkSender priorities (#4858)

* Reduces confusion when using overloaded operator< and priority_queue

Co-authored-by: peterbell10 <peterbell10@live.co.uk>
This commit is contained in:
Tiger Wang
2020-09-12 20:43:18 +01:00
committed by GitHub
parent 93adbdce9a
commit 198407807f
7 changed files with 31 additions and 34 deletions

View File

@@ -2331,7 +2331,7 @@ void cWorld::SetChunkData(cSetChunkData & a_SetChunkData)
ChunkSender.QueueSendChunkTo(
a_Chunk.GetPosX(),
a_Chunk.GetPosZ(),
cChunkSender::E_CHUNK_PRIORITY_MEDIUM,
cChunkSender::Priority::Medium,
a_Chunk.GetAllClients()
);
}
@@ -2803,7 +2803,7 @@ void cWorld::RemoveClientFromChunks(cClientHandle * a_Client)
void cWorld::SendChunkTo(int a_ChunkX, int a_ChunkZ, cChunkSender::eChunkPriority a_Priority, cClientHandle * a_Client)
void cWorld::SendChunkTo(int a_ChunkX, int a_ChunkZ, cChunkSender::Priority a_Priority, cClientHandle * a_Client)
{
m_ChunkSender.QueueSendChunkTo(a_ChunkX, a_ChunkZ, a_Priority, a_Client);
}
@@ -2812,7 +2812,7 @@ void cWorld::SendChunkTo(int a_ChunkX, int a_ChunkZ, cChunkSender::eChunkPriorit
void cWorld::ForceSendChunkTo(int a_ChunkX, int a_ChunkZ, cChunkSender::eChunkPriority a_Priority, cClientHandle * a_Client)
void cWorld::ForceSendChunkTo(int a_ChunkX, int a_ChunkZ, cChunkSender::Priority a_Priority, cClientHandle * a_Client)
{
a_Client->AddWantedChunk(a_ChunkX, a_ChunkZ);
m_ChunkSender.QueueSendChunkTo(a_ChunkX, a_ChunkZ, a_Priority, a_Client);