From 06a2b1211b7241acce8dfbfebc9eed19a987708c Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 28 Jun 2021 23:40:28 +0100 Subject: Invalidate m_LastStreamedChunk when player position doesn't match So teleporting to and back doesn't cause chunk sending to stop. * Fixes #4531 --- src/ClientHandle.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/ClientHandle.h') diff --git a/src/ClientHandle.h b/src/ClientHandle.h index 17dbefbeb..c33bd7fe0 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -117,8 +117,8 @@ public: // tolua_export /** Authenticates the specified user, called by cAuthenticator */ void Authenticate(const AString & a_Name, const cUUID & a_UUID, const Json::Value & a_Properties); - /** This function sends a new unloaded chunk to the player. Returns true if all chunks are loaded. */ - bool StreamNextChunk(); + /** Sends a set number of new chunks to the player on every invocation, until all chunks in the view distance have been sent. */ + void StreamNextChunks(); /** Remove all loaded chunks that are no longer in range */ void UnloadOutOfRangeChunks(void); @@ -407,8 +407,6 @@ public: // tolua_export /** Returns the protocol version number of the protocol that the client is talking. Returns zero if the protocol version is not (yet) known. */ UInt32 GetProtocolVersion(void) const { return m_ProtocolVersion; } // tolua_export - void InvalidateCachedSentChunk(); - bool IsPlayerChunkSent(); private: -- cgit v1.2.3