diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2021-11-11 22:02:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-11 22:02:29 +0100 |
commit | d49ce751ba6f8f2eb171633cea30a1119935f8c7 (patch) | |
tree | 25cb23102c0d778cada555c0c25e6dc3247a6514 /src/World.cpp | |
parent | Prevent placing of hangables on illegal blocks and break when support block broken (#5301) (diff) | |
download | cuberite-d49ce751ba6f8f2eb171633cea30a1119935f8c7.tar cuberite-d49ce751ba6f8f2eb171633cea30a1119935f8c7.tar.gz cuberite-d49ce751ba6f8f2eb171633cea30a1119935f8c7.tar.bz2 cuberite-d49ce751ba6f8f2eb171633cea30a1119935f8c7.tar.lz cuberite-d49ce751ba6f8f2eb171633cea30a1119935f8c7.tar.xz cuberite-d49ce751ba6f8f2eb171633cea30a1119935f8c7.tar.zst cuberite-d49ce751ba6f8f2eb171633cea30a1119935f8c7.zip |
Diffstat (limited to 'src/World.cpp')
-rw-r--r-- | src/World.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/World.cpp b/src/World.cpp index 3b52bd9aa..94fc0ba00 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -1028,6 +1028,12 @@ void cWorld::Tick(std::chrono::milliseconds a_Dt, std::chrono::milliseconds a_La BroadcastPlayerListUpdatePing(); } + // Process all clients' buffered actions: + for (const auto Player : m_Players) + { + Player->GetClientHandle()->ProcessProtocolIn(); + } + TickQueuedChunkDataSets(); TickQueuedBlocks(); m_ChunkMap.Tick(a_Dt); @@ -1234,7 +1240,7 @@ void cWorld::TickQueuedEntityAdditions(void) decltype(m_EntitiesToAdd) EntitiesToAdd; { cCSLock Lock(m_CSEntitiesToAdd); - EntitiesToAdd = std::move(m_EntitiesToAdd); + std::swap(EntitiesToAdd, m_EntitiesToAdd); } // Ensures m_Players manipulation happens under the chunkmap lock. |