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

@@ -507,7 +507,7 @@ bool cClientHandle::StreamNextChunk(void)
// Unloaded chunk found -> Send it to the client.
Lock.Unlock();
StreamChunk(ChunkX, ChunkZ, ((Range <= 2) ? cChunkSender::E_CHUNK_PRIORITY_HIGH : cChunkSender::E_CHUNK_PRIORITY_MEDIUM));
StreamChunk(ChunkX, ChunkZ, ((Range <= 2) ? cChunkSender::Priority::Critical : cChunkSender::Priority::Medium));
return false;
}
}
@@ -545,7 +545,7 @@ bool cClientHandle::StreamNextChunk(void)
// Unloaded chunk found -> Send it to the client.
Lock.Unlock();
StreamChunk(Coords.m_ChunkX, Coords.m_ChunkZ, cChunkSender::E_CHUNK_PRIORITY_LOW);
StreamChunk(Coords.m_ChunkX, Coords.m_ChunkZ, cChunkSender::Priority::Low);
return false;
}
}
@@ -609,7 +609,7 @@ void cClientHandle::UnloadOutOfRangeChunks(void)
void cClientHandle::StreamChunk(int a_ChunkX, int a_ChunkZ, cChunkSender::eChunkPriority a_Priority)
void cClientHandle::StreamChunk(int a_ChunkX, int a_ChunkZ, cChunkSender::Priority a_Priority)
{
if (m_State >= csDestroying)
{